Browse Source

Update issue-check.yml

pull/4046/head
ImSwordQueen 12 months ago
parent
commit
392e5a5694
  1. 13
      .github/workflows/issue-check.yml

13
.github/workflows/issue-check.yml

@ -1,19 +1,22 @@
name: Check if issue is a known issue name: MSHUWAP Issue Handler
on: on:
issues: issues:
types: [opened] # Triggers when an issue is opened types: [opened] # Trigger when an issue is opened
jobs: jobs:
check_keywords: check_keywords:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout repository - name: Checkout repository
uses: actions/checkout@v3 uses: actions/checkout@v3
- name: Log dynamic message with issue title - name: Log Custom Message with Issue Information
run: | run: |
echo "Checking issue: ${{ github.event.issue.title }} for known keywords..." # Log the custom message with issue title and number for context
echo "Checking Issue #${{ github.event.issue.number }}: ${{ github.event.issue.title }}"
echo "Check if issue is a known issue"
- name: Check for keywords in issue title and body - name: Check for keywords in issue title and body
id: check_keywords id: check_keywords
@ -48,5 +51,5 @@ jobs:
# Close the issue # Close the issue
curl -X PATCH \ curl -X PATCH \
-H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \ -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
-d '{"state": "closed", "reason": "notplanned"}' \ -d '{"state": "closed"}' \
"https://api.github.com/repos/${{ github.repository }}/issues/$ISSUE_NUMBER" "https://api.github.com/repos/${{ github.repository }}/issues/$ISSUE_NUMBER"

Loading…
Cancel
Save