[PATCH] D114412: github: Add action for automated issue notification
Tom Stellard via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jan 5 10:37:00 PST 2022
This revision was not accepted when it landed; it landed in state "Needs Review".
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rGdd48c6aff992: github: Add action for automated issue notification (authored by tstellar).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D114412/new/
https://reviews.llvm.org/D114412
Files:
.github/workflows/issue-subscriber.yml
Index: .github/workflows/issue-subscriber.yml
===================================================================
--- /dev/null
+++ .github/workflows/issue-subscriber.yml
@@ -0,0 +1,35 @@
+name: Issue Subscriber
+
+on:
+ issues:
+ types:
+ - labeled
+
+jobs:
+ auto-subscribe:
+ runs-on: ubuntu-latest
+ if: github.repository == 'llvm/llvm-project'
+ steps:
+ - name: Update watchers
+ uses: actions/github-script at v5
+ with:
+ github-token: ${{ secrets.ISSUE_MENTION_SECRET }}
+ script: |
+ const teamname = "issue-subscribers-" + context.payload.label.name.replace(/ /g, "-").replace(":","-").replace("/","-");
+ const comment = "@llvm/" + teamname;
+ try {
+ // This will throw an exception if the team does not exist and no
+ // comment will be created.
+ team = await github.rest.teams.getByName({
+ org: context.repo.owner,
+ team_slug: teamname
+ });
+ github.rest.issues.createComment({
+ issue_number: context.issue.number,
+ owner: context.repo.owner,
+ repo: context.repo.repo,
+ body: comment
+ });
+ } catch (e){
+ console.log(e);
+ }
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D114412.397638.patch
Type: text/x-patch
Size: 1329 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220105/4df71910/attachment.bin>
More information about the llvm-commits
mailing list