Count Issues #50
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Count Issues | |
on: | |
schedule: | |
# At 13:00 (1 pm) UTC / 8:00 EST on Monday | |
- cron: '0 13 * * 1' | |
workflow_dispatch: | |
jobs: | |
count_bug_issues: | |
runs-on: ubuntu-latest | |
outputs: | |
count: ${{ steps.count.outputs.count }} | |
steps: | |
- name: Count Bug | Bogue issues | |
id: count | |
uses: kazupon/issue-count-action@284ff91974f64c6ac7192a394d895434eabee85f | |
with: | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
labels: 'Bug | Bogue' | |
state: open | |
count_incident_action_issues: | |
runs-on: ubuntu-latest | |
outputs: | |
count: ${{ steps.count.outputs.count }} | |
steps: | |
- name: Count Incident Action issues | |
id: count | |
uses: kazupon/issue-count-action@284ff91974f64c6ac7192a394d895434eabee85f | |
with: | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
labels: 'Incident Action' | |
state: open | |
count_tech_debt_issues: | |
runs-on: ubuntu-latest | |
outputs: | |
count: ${{ steps.count.outputs.count }} | |
steps: | |
- name: Count Tech Debt issues | |
id: count | |
uses: kazupon/issue-count-action@284ff91974f64c6ac7192a394d895434eabee85f | |
with: | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
labels: 'Tech Debt' | |
state: open | |
report_to_slack: | |
needs: [count_bug_issues, count_incident_action_issues, count_tech_debt_issues] | |
runs-on: ubuntu-latest | |
steps: | |
- name: Notify Slack channel if this job failed | |
run: | | |
json="{\"text\":\"Core team tech debt show-off :muscle: :melting_face:\nBugs: ${{ needs.count_bug_issues.outputs.count }}, Incident Actions: ${{ needs.count_incident_action_issues.outputs.count }}, Tech Debt issues: ${{ needs.count_tech_debt_issues.outputs.count }}\"}" | |
curl -X POST -H 'Content-type: application/json' --data "$json" ${{ secrets.SLACK_WEBHOOK_URL }} |