ahmadnassri / action-dependabot-auto-merge

Automatically merge Dependabot PRs when version comparison is within range
MIT License
342 stars 48 forks source link

HttpError: Not Found - Error message when Action is triggered #12

Closed Vincent-FundApps closed 4 years ago

Vincent-FundApps commented 4 years ago

Hello, I'm getting this same error whenever the GitHub Action, which is based on the yaml below, is triggered. Do you have an idea where it's coming from? Could it be the PAT doesn't have sufficient rights?

GitHub Action yml:

name: Automerge Dependabot

on: 
  pull_request:

jobs:
  automerge:
    runs-on: ubuntu-latest
    steps:
      - uses: ahmadnassri/action-dependabot-auto-merge@v1
        with:
          target: minor
          github-token: ${{ secrets.Auto_merge_PAT }}

Error Message:

Run ahmadnassri/action-dependabot-auto-merge@v1
  with:
    target: minor
    github-token: ***
    command: merge
    approve: true
/usr/bin/docker run --name ahmadnassriactiondependabotautomergev1_f9474f --label 3b3ac6 --workdir /github/workspace --rm -e INPUT_TARGET -e INPUT_GITHUB-TOKEN -e INPUT_COMMAND -e INPUT_APPROVE -e HOME -e GITHUB_JOB -e GITHUB_REF -e GITHUB_SHA -e GITHUB_REPOSITORY -e GITHUB_REPOSITORY_OWNER -e GITHUB_RUN_ID -e GITHUB_RUN_NUMBER -e GITHUB_ACTOR -e GITHUB_WORKFLOW -e GITHUB_HEAD_REF -e GITHUB_BASE_REF -e GITHUB_EVENT_NAME -e GITHUB_SERVER_URL -e GITHUB_API_URL -e GITHUB_GRAPHQL_URL -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 ACTIONS_CACHE_URL -e GITHUB_ACTIONS=true -e CI=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/BucketNetting/BucketNetting":"/github/workspace" ahmadnassri/action-dependabot-auto-merge:v1
title: "Bump handlebars from 4.1.2 to 4.7.6 in /js"
from: 4.1.2
to: 4.7.6
dependency update target is "minor", found "minor", will auto-merge
##[error]Not Found
HttpError: Not Found
    at /action/node_modules/@octokit/request/dist-node/index.js:66:23
    at processTicksAndRejections (internal/process/task_queues.js:93:5)
    at async approve (file:///action/lib/api.js:2:3)
    at async default (file:///action/lib/index.js:33:5)
    at async file:///action/index.js:35:1
ahmadnassri commented 4 years ago

the issue is the token scope is not properly configured.

I've updated the README to detail the scopes needed: https://github.com/ahmadnassri/action-dependabot-auto-merge#token-scope