ytanikin / PRConventionalCommits

Apache License 2.0
44 stars 15 forks source link

Error when using custom labels #19

Open kuznetsss opened 3 months ago

kuznetsss commented 3 months ago

Hi, thanks for the useful action!

I'm getting an error Resource not accessible by integration with this workflow:

name: Check PR title
on:
  pull_request:
    types: [opened, edited, reopened, synchronize]
    branches: [develop]

jobs:
  check_title:
    runs-on: ubuntu-20.04
    permissions:
       pull-requests: write
    steps:
      - uses: ytanikin/PRConventionalCommits@1.2.0
        with:
          task_types: '["build","feat","fix","docs","test","ci","style","refactor","perf","chore"]'
          add_label: false
          custom_labels: '{"build":"build", "feat":"enhancement", "fix":"bug", "docs":"documentation", "test":"testability", "ci":"ci", "style":"refactoring", "refactor":"refactoring", "perf":"performance", "chore":"tooling"}'

I also checked that Settings -> Actions -> Workflow Permissions is set to Read and write permissions.

Could it be that the error is related to custom_labels? Because I found someone else using this action and it is working fine for them but they are not using custom labels https://github.com/isac322/cloudflared-operator/blob/master/.github/workflows/ci.yaml#L16-L19.

dermotduffy commented 2 weeks ago

Try it without the explicit scoping of permissions, e.g. remove the permissions block under jobs.