Skip to content

Commit

Permalink
Merge branch 'main' into issue-35
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeredian authored Apr 22, 2024
2 parents d979bf5 + 0ca5a9e commit 83e6e1a
Showing 1 changed file with 52 additions and 0 deletions.
52 changes: 52 additions & 0 deletions .github/workflows/issue-blank-issue-triage.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: "Issue / Blank issue triage"
on:
issues:
types: [opened, reopened]

permissions:
issues: write

concurrency:
group: 'triage'

jobs:
add-comment-to-blank-issue:
name: "On blank issue"
runs-on: ubuntu-latest
if: ${{ !contains(github.event.issue.labels.*.name, format('status{0} pending', ':')) }}
steps:
- name: "Generate token"
uses: tibdex/[email protected]
id: generate_token
with:
app_id: ${{ secrets.APP_ID }}
private_key: ${{ secrets.APP_PRIVATE_KEY }}
- name: "Add labels"
uses: actions/[email protected]
with:
github-token: ${{ steps.generate_token.outputs.token }}
script: |
github.rest.issues.addLabels({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
labels: ['status: pending']
});
- name: "Add comment"
uses: actions/[email protected]
env:
is_reopened: ${{ github.event.action == 'reopened' }}
with:
github-token: ${{ steps.generate_token.outputs.token }}
script: |
const target = process.env.is_reopened ? 'reopening an': 'submitting a new'
const commentText = `**Thank you for ${target} issue.**
It will be reviewed shortly by the Print Maker Lab team.
_Please make sure, that you described everything in details so we can help you as soon as possible._`
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: commentText
});

0 comments on commit 83e6e1a

Please sign in to comment.