srggrs / assign-one-project-github-action

Automatically add an issue or pull request to specific GitHub Project(s) when you create and/or label them.
MIT License
169 stars 60 forks source link

A label added by a bot action doesn't trigger #45

Closed ecureuill closed 4 years ago

ecureuill commented 4 years ago

I have this condition that triggers when I manually add a label to the issue. But when the label is added by a bot from another action, it doesn't work.

Is this the expected behavior?

   if: contains(github.event.issue.labels.*.name, '1 - Planning')
srggrs commented 4 years ago

mmmm not sure about the bot... I need to test it!

few questions:

  1. which bot are u using for labels?
  2. how your workflow file looks like (not interested in the private details, but on the instructions, see example below)
    on:
    issues:
    types: [opened, labeled]
  3. are u sure your label == '1 - Planning', I think spaces and capital letters matter.
ecureuill commented 4 years ago
  1. are u sure your label == '1 - Planning', I think spaces and capital letters matter. Yes, it is working when I manually labeled a issue

I'm using the Auto card labeler to label issues when it's moved in project.

I found this GITHUB_TOKEN prevent actions to trigger another action, so I'm using a personal token

srggrs commented 4 years ago

@ecureuill did u solve the issue? Hae you tried using a combination of 'labeled' and/or 'edited' from here

ecureuill commented 4 years ago

Sorry for delay. The problem was with GITHUB_TOKEN, I swap for a Personal Access Token instead.

https://help.github.com/en/actions/reference/events-that-trigger-workflows#triggering-new-workflows-using-a-personal-access-token