Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: missing GITHUB_TOKEN #15

Closed
Pushplaybang opened this issue Jan 10, 2020 · 1 comment
Closed

Error: missing GITHUB_TOKEN #15

Pushplaybang opened this issue Jan 10, 2020 · 1 comment

Comments

@Pushplaybang
Copy link

Added this in a pull request, though the action produces this:

Run wip/action@master
/usr/bin/docker run --name ee64e760ebf75cc4ca4bcb05716d63461be_77fac4 --label 671ee6 --workdir /github/workspace --rm -e INPUT_GITHUB_TOKEN -e HOME -e GITHUB_REF -e GITHUB_SHA -e GITHUB_REPOSITORY -e GITHUB_ACTOR -e GITHUB_WORKFLOW -e GITHUB_HEAD_REF -e GITHUB_BASE_REF -e GITHUB_EVENT_NAME -e GITHUB_WORKSPACE -e GITHUB_ACTION -e GITHUB_EVENT_PATH -e RUNNER_OS -e RUNNER_TOOL_CACHE -e RUNNER_TEMP -e RUNNER_WORKSPACE -e ACTIONS_RUNTIME_URL -e ACTIONS_RUNTIME_TOKEN -e GITHUB_ACTIONS=true -v "/var/run/docker.sock":"/var/run/docker.sock" -v "/home/runner/work/_temp/_github_home":"/github/home" -v "/home/runner/work/_temp/_github_workflow":"/github/workflow" -v "/home/runner/work/hungerrush-docs/hungerrush-docs":"/github/workspace" 671ee6:4e760ebf75cc4ca4bcb05716d63461be
There are environment variables missing from this runtime, but would be present on GitHub.
- GITHUB_TOKEN
(node:1) UnhandledPromiseRejectionWarning: HttpError: Bad credentials
    at /node_modules/@octokit/request/lib/request.js:55:27
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
(node:1) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:1) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

The action I've defined looks like this:

on: [pull_request]
name: "Set status on pull_request"

jobs:
  wip:
    name: "Set status"
    runs-on: ubuntu-latest
    steps:
      - uses: wip/action@master
        with:
          github-token: ${{ secrets.GITHUB_TOKEN }}
@Pushplaybang
Copy link
Author

We've solved this with the following config:

name: Set PR review status
on:
  pull_request:
    types: [ opened, synchronize, reopened, edited ]

jobs:
  wip:
    name: Set WIP status
    runs-on: ubuntu-latest
    env:
      GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
    steps:
      - uses: wip/action@v1.0.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant