github / issue-labeler

An action for automatically labelling issues

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Could not add label(s) to issue

waynexia opened this issue · comments

Example workflow: https://github.com/GreptimeTeam/greptimedb/actions/runs/7327676623/job/19954858878
Config yml: https://github.com/GreptimeTeam/greptimedb/blob/develop/.github/doc-label-config.yml
Workflow file: https://github.com/GreptimeTeam/greptimedb/blob/develop/.github/workflows/doc-label.yml

Error:

Run github/issue-labeler@v3.3
Configuration file (path: .github/doc-label-config.yml) does not exist locally, fetching via the API
Could not add label(s) Doc not needed to issue #3007
Error: AggregateError

Hi, I encountered this issue on trying to use issue-labeler to add labels based on PR description. I guess this is caused by some permission problem, but I don't know the actual reason from the error message. And that token secrets.GITHUB_TOKEN works well on other workflows, example.

And I've tried this config on my forked repo, it also works as expected: waynexia/greptimedb#2

The problem is solved. It's because the fork repo cannot access secrets in target repo. Change pull_request to pull_request_target can avoid this: GreptimeTeam/greptimedb#3011