Skip to content

Commit

Permalink
Create github_pagerduty_score_calculation.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
rishabhtayal72 authored Aug 5, 2024
1 parent 528db94 commit 60c5ea6
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/github_pagerduty_score_calculation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Issue Created
on:
issues:
types: [opened]

jobs:
extract-issue-body:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.x'
- if: github.event.label.name == 'pager-duty'
name: discord webhook
env:
DISCORD_WEBHOOK: ${{ secrets.GH_ISSUES_DISCORD_WEBHOOK }}
DISCORD_WEBHOOK_FORUM: ${{ secrets.PAGERDUTY_DISCORD_WEBHOOK }}
ENABLE_FORUM: true
uses: devtron-labs/action-discord@master
with:
args: " ${{ github.event.issue.title }} ${{ github.event.issue.html_url }}"
- name: Check if pager-duty template is used
if: ${{ contains(github.event.issue.labels.*.name, 'pager-duty') && contains(github.event.issue.labels.*.name, 'bug') }}
run: |
echo "Issue was created using pager-duty template"
python3 scripts/github_pagerduty_issue_score_calculation.py
env:
ISSUE_NUMBER: ${{ github.event.issue.number }}
ISSUE_BODY: ${{ github.event.issue.body }}
GITHUB_TOKEN: ${{ github.token }}
PAGERDUTY_SCORE_THRESHOLD: ${{ vars.PAGERDUTY_SCORE_THRESHOLD }}

0 comments on commit 60c5ea6

Please sign in to comment.