Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
59 changes: 40 additions & 19 deletions .github/workflows/issue-new-issues-triage.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: "Issue / New issue triage"
on:
issues:
types: [labeled, opened]
types: [opened]

permissions:
issues: write
Expand All @@ -10,57 +10,78 @@ jobs:
add-comment-to-enhancement:
name: "On enhancement"
runs-on: ubuntu-latest
if: ${{ contains(github.event.label.name, format('issue{0} enhancement', ':')) && contains(github.event.label.name, format('status{0} pending', ':')) }}
if: ${{ contains(github.event.issue.labels.*.name, format('issue{0} enhancement', ':')) && contains(github.event.issue.labels.*.name, format('status{0} pending', ':')) }}
steps:
- name: Log github event
env:
$GITHUB_CONTEXT_LABELS: ${{ toJson(github.event.label) }}
run: echo "$GITHUB_CONTEXT_LABELS"
- name: "Generate token"
uses: tibdex/github-app-token@v2.1.0
id: generate_token
with:
app_id: ${{ secrets.APP_ID }}
private_key: ${{ secrets.APP_PRIVATE_KEY }}
- name: Add comment
uses: actions/github-script@v7.0.1
with:
github-token: ${{ steps.generate_token.outputs.token }}
script: |
const comment = `**Thank you for submitting a feature request.**
Your proposal is open and will soon be reviewed by the Print Maker Lab team.

_If your proposal is accepted and the Print Maker Lab team has bandwidth they will take on the issue, or else request you or other volunteers from the community to work on this issue._`

github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: 'Thank you for submitting a feature request. Your proposal is open and will soon be reviewed by the Print Maker Lab team.<br><br>If your proposal is accepted and the Print Maker Lab team has bandwidth they will take on the issue, or else request you or other volunteers from the community to work on this issue.'
body: comment
})
add-comment-to-bug:
name: "On bug report"
runs-on: ubuntu-latest
if: ${{ contains(github.event.label.name, format('issue{0} bug', ':')) && contains(github.event.label.name, format('status{0} pending', ':')) }}
if: ${{ contains(github.event.issue.labels.*.name, format('issue{0} bug', ':')) && contains(github.event.issue.labels.*.name, format('status{0} pending', ':')) }}
steps:
- name: Log github event
env:
$GITHUB_CONTEXT_LABELS: ${{ toJson(github.event.label) }}
run: echo "$GITHUB_CONTEXT_LABELS"
- name: "Generate token"
uses: tibdex/github-app-token@v2.1.0
id: generate_token
with:
app_id: ${{ secrets.APP_ID }}
private_key: ${{ secrets.APP_PRIVATE_KEY }}
- name: Add comment
uses: actions/github-script@v7.0.1
with:
github-token: ${{ steps.generate_token.outputs.token }}
script: |
const comment = `**Thank you for submitting a bug report.**
Your message will be reviewed shortly by the Print Maker Lab team.

_If your request is reproducible and the Print Maker Lab team has the bandwidth, they will look into it, or ask you or other community volunteers to work on it._`

github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: 'Thank you for submitting a bug report. Your message will be reviewed shortly by the Print Maker Lab team.<br><br>If your request is reproducible and the Print Maker Lab team has the bandwidth, they will look into it, or ask you or other community volunteers to work on it.'
body: comment
})
add-comment-to-question:
name: "On question"
runs-on: ubuntu-latest
if: ${{ contains(github.event.label.name, format('issue{0} question', ':')) && contains(github.event.label.name, format('status{0} pending', ':')) }}
if: ${{ contains(github.event.issue.labels.*.name, format('issue{0} question', ':')) && contains(github.event.issue.labels.*.name, format('status{0} pending', ':')) }}
steps:
- name: Log github event
env:
$GITHUB_CONTEXT_LABELS: ${{ toJson(github.event.label) }}
run: echo "$GITHUB_CONTEXT_LABELS"
- name: "Generate token"
uses: tibdex/github-app-token@v2.1.0
id: generate_token
with:
app_id: ${{ secrets.APP_ID }}
private_key: ${{ secrets.APP_PRIVATE_KEY }}
- name: Add comment
uses: actions/github-script@v7.0.1
with:
github-token: ${{ steps.generate_token.outputs.token }}
script: |
const comment = `**Thank you for submitting your question.**
Your message will be reviewed shortly by the Print Maker Lab team.`
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: 'Thank you for submitting your question. Your question will be reviewed shortly by the Print Maker Lab team.'
body: comment
})