Skip to content

Danger needs a new GitHub API token #101

Closed

Description

@samsonjs

@dblock Got this failure and it seems like the API token we bundle in the repo for danger is no longer valid. See #100

Run # the token is public, has public_repo scope and belongs to the grape-bot user owned by @dblock, this is ok
  # the token is public, has public_repo scope and belongs to the grape-bot user owned by @dblock, this is ok
  TOKEN=$(echo -n Z2hwX2lYb0dPNXNyejYzOFJyaTV3QUxUdkNiS1dtblFwZTFuRXpmMwo= | base64 --decode)
  DANGER_GITHUB_API_TOKEN=$TOKEN bundle exec danger --verbose
  shell: /usr/bin/bash -e {0}
To use retry middleware with Faraday v2.0+, install `faraday-retry` gem
bundler: failed to load command: danger (/opt/hostedtoolcache/Ruby/3.4.4/x64/bin/danger)
/opt/hostedtoolcache/Ruby/3.4.4/x64/lib/ruby/gems/3.4.0/gems/octokit-10.0.0/lib/octokit/response/raise_error.rb:14:in 'Octokit::Response::RaiseError#on_complete': GET https://api.github.com/repos/ruby-grape/grape-active_model_serializers/pulls/100: 401 - Bad credentials // See: https://docs.github.com/rest (Octokit::Unauthorized)
	from /opt/hostedtoolcache/Ruby/3.4.4/x64/lib/ruby/gems/3.4.0/gems/faraday-2.14.0/lib/faraday/middleware.rb:57:in 'block in 

Activity

  1. samsonjs commented on Dec 3, 2025

    @samsonjs
    CollaboratorAuthor

    The current token matches what's in grape so I'm not sure why it's not working. Maybe it doesn't work because my PR branch is in my fork?

    https://github.com/ruby-grape/grape/blob/master/.github/workflows/danger.yml

  2. dblock commented on Oct 26, 2026

    @dblock
    Member

    Resolved by #104, now merged. Danger uses the built-in GITHUB_TOKEN through tokenless report/comment workflows instead of the expired bundled personal access token. Tokenless Danger report generation passes.

    Posted by Copilot, an AI, on behalf of @dblock.

  3. samsonjs commented on Oct 26, 2026

    @samsonjs
    CollaboratorAuthor

    Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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