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

[BUG] Action is fialing with graphql error #130

Closed
rokups opened this issue Feb 12, 2023 · 4 comments
Closed

[BUG] Action is fialing with graphql error #130

rokups opened this issue Feb 12, 2023 · 4 comments
Assignees
Labels
bug Something isn't working

Comments

@rokups
Copy link
Contributor

rokups commented Feb 12, 2023

CLA workflow fails with a following error:

Error: graphql call to get the committers details failed: GraphqlError: Resource not accessible by integration

My workflow file:

name: "CLA Assistant"
on:
  issue_comment:
    types: [created]
  pull_request_target:
    types: [opened,closed,synchronize]

jobs:
  CLAAssistant:
    runs-on: ubuntu-latest
    steps:
      - name: "CLA Assistant"
        if: (github.event.comment.body == 'recheck' || github.event.comment.body == 'I have read the CLA Document and I hereby sign the CLA') || github.event_name == 'pull_request_target'
        uses: contributor-assistant/github-action@v2.3.0
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
          PERSONAL_ACCESS_TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
        with:
          path-to-signatures: '.github/signatures/version1/cla.json'
          path-to-document: 'https://github.com/rokups/charting_app/blob/master/.github/CLA.md'
          branch: 'master'
          allowlist: rokups
          lock-pullrequest-aftermerge: false

image

I did try with and without PERSONAL_ACCESS_TOKEN. Repository is private.

@rokups rokups added the bug Something isn't working label Feb 12, 2023
@ibakshay
Copy link
Member

Hi @rokups,
I will look into your issue today and will keep you posted :)

@ibakshay ibakshay self-assigned this Feb 16, 2023
@ibakshay
Copy link
Member

Hi @rokups,
Looks like you have configured Github Actions workflow permissions in your private repository to "read repository contents and packages permissions". So then, you need to manually specify permissions in the CLA workflow file like below.
Screenshot 2023-02-16 at 22 55 25
Feel free to create a PR and mention about adding this permission explicitly in this repository's README if the below workflow file works for you :)

name: "CLA Assistant"
on:
  issue_comment:
    types: [created]
  pull_request_target:
    types: [opened,closed,synchronize]

permissions:
  actions: write
  contents: write
  pull-requests: write
  statuses: write

jobs:
  CLAAssistant:
    runs-on: ubuntu-latest
    steps:
      - name: "CLA Assistant"
        if: (github.event.comment.body == 'recheck' || github.event.comment.body == 'I have read the CLA Document and I hereby sign the CLA') || github.event_name == 'pull_request_target'
        uses: contributor-assistant/github-action@v2.3.0
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
          PERSONAL_ACCESS_TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
        with:
          path-to-signatures: '.github/signatures/version1/cla.json'
          path-to-document: 'https://github.com/rokups/charting_app/blob/master/.github/CLA.md'
          branch: 'master'
          allowlist: rokups
          lock-pullrequest-aftermerge: false

For more information, please refer this link

@rokups
Copy link
Contributor Author

rokups commented Feb 17, 2023

Thank you, it worked perfectly. I do not recall changing this option, must be a default i suppose? In any case, issue is solved.

@ibakshay
Copy link
Member

@rokups
Great! Default is read and write permissions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Done
Development

No branches or pull requests

2 participants