diff --git a/.github/issue-opened.json b/.github/issue-opened.json index 276c9464a76..cfb39512bc5 100644 --- a/.github/issue-opened.json +++ b/.github/issue-opened.json @@ -4,8 +4,7 @@ "memberOf": { "org": "grafana" }, - "noLabels": true, - "addLabel": "internal", + "noLabels": true, "comment": " please add one or more appropriate labels. Here are some tips:\r\n\r\n- if you are making an issue, TODO, or reminder for yourself or your team, please add one label that best describes the product or feature area. Please also add the issue to your project board. :rocket:\r\n\r\n- if you are making an issue for any other reason (docs typo, you found a bug, etc), please add at least one label that best describes the product or feature that you are discussing (e.g. `area/alerting`, `datasource/loki`, `type/docs`, `type/bug`, etc). [Our issue triage](https://github.com/grafana/grafana/blob/main/contribute/ISSUE_TRIAGE.md#3-categorize-an-issue) doc also provides additional guidance on labeling. :rocket:\r\n\r\n Thank you! :heart:" } ] \ No newline at end of file diff --git a/.github/workflows/issue-opened.yml b/.github/workflows/issue-opened.yml index 97694bd2d04..76ebd06fe8b 100644 --- a/.github/workflows/issue-opened.yml +++ b/.github/workflows/issue-opened.yml @@ -117,3 +117,17 @@ jobs: } env: SLACK_WEBHOOK_URL: ${{ env.AUTOTRIAGER_SLACK_WEBHOOK_URL }} + auto-label-internal-issues: + needs: [main] + runs-on: ubuntu-latest + permissions: + issues: write + steps: + - name: "Auto label internal issues" + if: github.repository == 'grafana/grafana' && (github.event.issue.author_association == 'MEMBER' || github.event.issue.author_association == 'OWNER') + run: gh issue edit "$NUMBER" --add-label "$LABELS" + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GH_REPO: ${{ github.repository }} + NUMBER: ${{ github.event.issue.number }} + LABELS: internal \ No newline at end of file