[GH Request] Onboard taimoor-ahmed-1 #1109
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
# This workflow runs when a ticket is created. | |
# It adds the github-request label, tags on-call, and posts in Axim's internal slack channel. | |
# | |
# Separately, Axim's project board (https://github.com/orgs/openedx/projects/8) | |
# automatically adds all issues from this repo. | |
name: Label, tag, and notify on-call | |
on: | |
issues: | |
types: [opened] | |
env: | |
ORGANIZATION: openedx | |
jobs: | |
# Add a label to all issues that don't have it already (the template adds it automatically... | |
# but only if the requester has triage access on this repo). | |
# TODO: We used to add this label only to issues which were created from the on-call template. | |
# Since May 2024, we only use this repo for on-call issues, so we just add the label to everything. | |
# Once we've cleaned out our backlog of non-oncall issues from this repo, we can phase out | |
# this label entirely. | |
add_label: | |
runs-on: ubuntu-latest | |
# This is defined on all 2 jobs - so need to change x2 if changing this. | |
if: ${{ !contains(github.event.issue.labels.*.name, 'github-request') }} | |
steps: | |
- name: apply github-request label | |
uses: actions-ecosystem/action-add-labels@v1 | |
with: | |
labels: github-request | |
# TODO: We could probably do this with CODEOWNERS and some premade GitHub<->Slack integration. | |
tag_and_notify: | |
runs-on: ubuntu-latest | |
steps: | |
- run: gh issue comment $ISSUE --body "Thank you for your report! @openedx/axim-oncall will triage within a business day. Simple requests usually take 2-3 business days to resolve; more complex requests could take longer." | |
env: | |
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
ISSUE: ${{ github.event.issue.html_url }} | |
- name: Send custom JSON data to Slack workflow | |
id: slack | |
uses: slackapi/slack-github-action@v2.0.0 | |
with: | |
webhook-type: webhook-trigger | |
# This data can be any valid JSON from a previous step in the GitHub Action | |
payload: | | |
{ | |
"msg": "${{ github.event.issue.title }}\nAuthor: ${{ github.event.issue.user.login }}\nURL: https://www.github.com/openedx/axim-engineering/issues/${{ github.event.issue.number }}" | |
} | |
env: | |
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} | |