Token bug in converter.m

オープン
#35 コメント 0 件 リアクション 0 件 担当者 1 名 GitHub で見る

@k-deeley がすでに取り組んでいます。

2026年10月21日 から。

  • #37 @k-deeley による — オープン

評価

この issue はまだ評価されていません。

説明

bug

Both the GitHub and GitLab cases pass "" as the default token (lines 21, 25), but the GitHub.m and GitLab.m constructors expect missing to skip authentication. So even when no token env var is set, "" gets sent as the auth header and the API returns 401. The unauthenticated GitHub path should work but can't because of this.

Reproduction Steps:
  1. Install DocMaker v0.8.0 (MATLAB_DocMaker.mltbx from the GitHub release) in MATLAB:
>> matlab.addons.install("MATLAB_DocMaker.mltbx")
  1. Make sure no token is set anywhere:
>> setenv("DOCMAKER_GITLAB_HOSTNAME", "")
>> setenv("DOCMAKER_GITLAB_TOKEN", "")
  1. Minimal repro:
>> setenv("DOCMAKER_CONVERTER", "GitHub")
>> c = docmaker.converter();
>> c.Token % Expected <missing>

ans = 

    ""

>> c.md2xml("# Hello")
Error using docmaker.GitHub/md2xml (line 80)
[HTTP/1.1 401 Unauthorized] Bad credentials
主要言語
MATLAB
スター
10
フォーク
3
PR マージ指標
30日以内にマージされた PR はありません

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

mathworks/docmaker のほかの issue

mathworks/docmaker の issue をすべて見る

似ている issue

MATLAB の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。