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

HttpError: Resource not accessible by integration #8

Closed
FogDong opened this issue Oct 26, 2021 · 4 comments
Closed

HttpError: Resource not accessible by integration #8

FogDong opened this issue Oct 26, 2021 · 4 comments

Comments

@FogDong
Copy link

FogDong commented Oct 26, 2021

If the pull request is coming from a fork, it may trigger the error HttpError: Resource not accessible by integration when attempting to add a label.

May same to the error: actions/labeler#12

@thehanimo
Copy link
Owner

Hi @FogDong! That's very interesting. I think the solution involves using pull_request_target instead of pull_request. Might need changes to be made in the action as well. I will take a look at this and post an update here. Thanks!

@thehanimo
Copy link
Owner

thehanimo commented Oct 26, 2021

Found the fix @FogDong! Replacing pull_request with pull_request_target as the event trigger does it. Had to make a minor fix to read issue_number properly. Updated README and released v1.3.2!

Make sure your yaml file looks something like this now:

name: "PR Title Checker"
on:
  pull_request_target:
    types:
      - opened
      - edited
      - synchronize
      - labeled
      - unlabeled

jobs:
  check:
    runs-on: ubuntu-latest
    steps:
      - uses: thehanimo/[email protected]
        with:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
          pass_on_octokit_error: false
          configuration_path: ".github/pr-title-checker-config.json"

pull_request is now pull_request_target and version should be v1.3.2. Hope this helps!

@rakesh4145
Copy link

how to check title like :-- i had made changes with JIRA ticket
now i want to match string if JIRA exist in PR Title.
please suggest me regex for that

@thehanimo
Copy link
Owner

Assuming you just want to check if JIRA exists anywhere in the PR title, use: "JIRA"

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