Team mention from bot not working

Hi! :wave:

I’m trying to mention my team from actions/github-script – individual mentions work alright, but team mentions are shown as plain text when sent from github-actions[bot].

If I query the body attribute of an issue comment typed manually (this is successfully turned into a team mention) and compare it with the body attribute of an issue comment sent by github-actions[bot], I can’t spot a formatting difference.

What’s going on here?


I’m having the same problem here and not sure how to go about it. :frowning:

I also have the same issue. it is believed a github bug, and they have not fixed it yet.
do you guys find any workaround can share?

Hi after a few more testing, i managed to make it work.
The trick is you need to give the member permission for you app.
It is under app settings → permissions & events → Organization → member → read only

Then i can mention @ team no problem

1 Like

Hey @iCynara was this using an actual GitHub App or just an Action?

I’m hitting the same issue but with the following workflow:

name: Notify for new PR

    types: [opened]

    runs-on: ubuntu-20.04
      - name: Notify @chaostoolkit/maintainers
        uses: JoseThen/comment-pr@v1.1.0
          comment: |
            Hey @chaostoolkit/maintainers
            Someone just raised this PR! :construction_worker:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

I get the message but it’s not linked:

However if I ‘edit’ the post and go to preview, it’s then linked :frowning:

I’m also having this issue via actions :frowning:

The issue here is that the default GITHUB_TOKEN does not have permission to read teams in an organization:

Its access is limited to the repository where the workflow is running. You’ll need to create a PAT for that functionality to work. If you are using actions/github-script, you can pass the PAT as an input (it default to the GITHUB_TOKEN if no other token is passed):

1 Like