github-actionsgithub-cli

Implement workflow to Label Issue as "blocked" Based on Dependencies - Not Found error


I am trying to implement a GitHub Actions workflow that automatically labels an issue as "blocked" if it has dependencies on tasks that are still in progress. The action should be triggered when an issue is opened, edited, or reopened. Technical solution:

So far I have

Is there a specific reason why the issue label command might not be recognized despite having the correct version of GitHub CLI? Why all the time I faced with:

{
|   "message": "Not Found",
|   "documentation_url": "https://docs.github.com/rest/issues/labels#add-labels-to-an-issue"
| }

I have tried:


Solution

  • Make sure the following:

    At first I was struggling to reproduce this problem, trying on Github Actions directly I had no issues. With the Act tool it worked too, until I changed number in the test-event.json to an issue that does not exist, only then did I get the error you mentioned. Using a token without access to a private repository also produces this behavior.