Skip to content

Token bug in converter.m #35

Open
Open

Description

@k-deeley

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

Activity

  1. self-assigned this
    on Oct 21, 2026
  2. added theissue type on Oct 21, 2026
  3. linked a pull request that will close this issue35 token bug in converterm #37on Oct 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions