From a2fa89f99b7cf85343c765243dd97546826137b7 Mon Sep 17 00:00:00 2001 From: AllyW Date: Thu, 25 Jul 2024 09:23:05 +0800 Subject: [PATCH] {CI} Add non-security issue label check (#7818) * add non-security check * adjust comment --- .github/template/non-security-comment.md | 7 ++++++ .../workflows/AddIssueCommentWithLabel.yml | 25 +++++++++++++++++++ 2 files changed, 32 insertions(+) create mode 100644 .github/template/non-security-comment.md create mode 100644 .github/workflows/AddIssueCommentWithLabel.yml diff --git a/.github/template/non-security-comment.md b/.github/template/non-security-comment.md new file mode 100644 index 00000000000..baac10bbd5c --- /dev/null +++ b/.github/template/non-security-comment.md @@ -0,0 +1,7 @@ +Hi, this inquiry has been well received albeit being triaged as non-security related ask. + +Azure CLI is currently prioritizing direct SFI requirements and items and this request does not seem to be related to SFI. We'll retain it in our backlog at this point. Please reach out to AzPyCli@microsoft.com if you'd justify it's highly customer-impacted and need to be escalated. + +Thank you, + +Azure CLI team \ No newline at end of file diff --git a/.github/workflows/AddIssueCommentWithLabel.yml b/.github/workflows/AddIssueCommentWithLabel.yml new file mode 100644 index 00000000000..43c9672418b --- /dev/null +++ b/.github/workflows/AddIssueCommentWithLabel.yml @@ -0,0 +1,25 @@ +name: Comment Issue when labeled non-security +on: + issues: + types: [opened, labeled, unlabeled] + +jobs: + comment-non-security: + if: contains(github.event.issue.labels.*.name, 'non-security') + runs-on: ubuntu-20.04 + permissions: + issues: write + name: Comment on issue + steps: + - name: Checkout comment message + uses: actions/checkout@v4 + with: + sparse-checkout: | + .github/template/non-security-comment.md + - name: Comment on issue with no security label + uses: mshick/add-pr-comment@v2 + with: + repo-token: ${{ secrets.GITHUB_TOKEN }} + message-id: issueNoSecurityCommentBot + message-path: | + .github/template/non-security-comment.md