issue-label-notification-action icon indicating copy to clipboard operation
issue-label-notification-action copied to clipboard

Team mentions in comments does not result in notifications

Open krukow opened this issue 4 years ago • 3 comments

I've got a config ala:

jobs:
  notify:
    runs-on: ubuntu-latest
    steps:
        - uses: jenschelkopf/[email protected]
          with:
             recipients: |
                  help wanted=@org-name/team-name

When the help wanted label is applied I see the comment posted as expected, but the team mention (@org-name/team-name) does not cause notifications to be sent.

Notably this does work for individual mentions (@krukow) but not for org-namespaced/team names @org/team

I've validated that if I create a comment using curl + REST, I do get the results as expected, so I believe the difference must be in this action or in octokit/rest.js?

i.e. this correctly notifies the team:

curl \
  -X POST \
  -H "Accept: application/vnd.github.v3+json" -H "Authorization: token [REDACTED]" \
  https://api.github.com/repos/[redacted]/[redacted]/issues/[N]/comments \
  -d '{"body":"Heads up @org-name/team-name - the 'help-wanted' label was applied to this issue."}'

krukow avatar Aug 31 '20 07:08 krukow

Bump, ran into this too

dannykopping avatar Jul 13 '21 13:07 dannykopping

cc : @jenschelkopf

krukow avatar Jul 13 '21 13:07 krukow

Pass your Personal Access Token with the read:org scope to the action. Your .yml will look something like this.

name: Notify users based on issue labels

on:
  issues:
      types: [labeled]

jobs:
  notify:
    runs-on: ubuntu-latest
    steps:
        - uses: jenschelkopf/[email protected]
          with:
             token: ${{ secrets.GITHUB_TOKEN }}
             recipients: |
                  help wanted=@org-name/team-name

javsjmoore avatar Nov 30 '21 15:11 javsjmoore