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

Does this work with PRs from forks? #19

Open
alanhartless opened this issue Oct 20, 2021 · 3 comments
Open

Does this work with PRs from forks? #19

alanhartless opened this issue Oct 20, 2021 · 3 comments

Comments

@alanhartless
Copy link

I'd like to implement this in our "read the docs" repository where contributors contribute PRs from their personal (public) forks. My goal is to auto merge labeled PRs into a development branch so that Read the Docs will auto-build the latest developer docs to make it easy to view content/changes introduced by PRs.

But I keep getting this error:

/usr/local/bundle/gems/octokit-4.14.0/lib/octokit/response/raise_error.rb:16:in `on_complete': POST https://api.github.com/repos/mautic/developer-documentation-new/merges: 403 - Resource not accessible by integration

I'm using the following for the action

name: Merge branch with labeled
on:
  pull_request:
    types: [labeled]
jobs:
  merge-branch:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@master

      - name: Merge by labeled
        uses: devmasx/[email protected]
        with:
          label_name: 'review'
          target_branch: 'development'
          github_token: ${{ secrets.GITHUB_TOKEN }}

Any thoughts?

@pegonzalezs
Copy link

pegonzalezs commented Jan 26, 2022

Hi @alanhartless , have you been able to progress in this issue? I'm currently facing the same problem. Thanks!

@pegonzalezs
Copy link

@alanhartless FYI. Did get over it creating a personal token and providing more permissions than standard GITHUB_TOKEN has.

For full info take a look here:
https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token

@markcmiller86
Copy link

more permissions than standard GITHUB_TOKEN has

@pegonzalezs any chance you could elaborate...which permissions?

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

No branches or pull requests

3 participants