Skip to content

Commit

Permalink
Enable new issue workflow for maintainers notification
Browse files Browse the repository at this point in the history
  • Loading branch information
tdk-opensource committed Sep 13, 2024
1 parent 4d45493 commit 5aac83e
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 13 deletions.
13 changes: 0 additions & 13 deletions .github/ISSUE_TEMPLATE/default-issue-template.md

This file was deleted.

32 changes: 32 additions & 0 deletions .github/workflows/new_issue_notification.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Comment on New Issue to Notify Code Owners

on:
issues:
types: [opened]

jobs:
comment:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: Get CODEOWNERS
id: get-codeowners
run: |
sed -ne "s/^\* \(.*\)/CODEOWNERS=\1/p;" CODEOWNERS > "$GITHUB_OUTPUT"
- name: Comment on the new issue
uses: actions/github-script@v6
with:
github-token: ${{ secrets.BOT_ACCOUNT_PAT }}
script: |
const issueNumber = context.issue.number;
const commentBody = "Thank you for opening this issue! We will look into it shortly.<br><br>Notifying ${{ steps.get-codeowners.outputs.CODEOWNERS }}";
await github.rest.issues.createComment({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: issueNumber,
body: commentBody
});

0 comments on commit 5aac83e

Please sign in to comment.