Skip to content

[Bug] step0_fork_prs ignores GITHUB_TOKEN in .env file #37

Description

@Yuto-24

Describe the bug

The script step0_fork_prs fails to recognize the GITHUB_TOKEN defined in the .env file, even though the documentation suggests it should. It only works when the token is provided explicitly via the --token argument.

Steps to Reproduce

  1. Copy .env.example to .env.
  2. Set GITHUB_TOKEN in the .env file:
    GITHUB_TOKEN=ghp_MY_SECRET_TOKEN
  3. Run the following command:
    uv run python -m code_review_benchmark.step0_fork_prs \
      --org test--yuto-personal \
      --name Gemini

Actual Behavior

The command fails with the following error:
Error: Set GITHUB_TOKEN or use --token

Expected Behavior

The script should load the token from the .env file automatically, as implied by the offline/README.md.

Workaround

Giving the token inline works correctly:

uv run python -m code_review_benchmark.step0_fork_prs \
  --org test--yuto-personal \
  --name Gemini \
  --token ghp_MY_SECRET_TOKEN

Environment

  • Repository: withmartian/code-review-benchmark
  • Script: code_review_benchmark.step0_fork_prs

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions