Skip to content

Create quarterly issues for GitHub audit #2

Create quarterly issues for GitHub audit

Create quarterly issues for GitHub audit #2

name: Create quarterly issues for GitHub audit
on:
schedule:
- cron: 0 0 1 1,4,7,10 *
workflow_dispatch: {}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
jobs:
create_issue:
name: Create quarterly issues
runs-on: ubuntu-latest
permissions:
issues: write
steps:
- run: |
# Audit GitHub Users
new_issue_url=$(gh issue create --repo "openedx/axim-engineering" \
--title "Quarterly Audit of Github Users" \
--label "github-request" \
--body "It is time to perform the quartely audit of GitHub users in the \`openedx\` org. The playbook for performing the audit can be found [here](https://openedx.atlassian.net/wiki/spaces/COMM/pages/3438903337/On-call+Playbooks#%F0%9F%94%8D-Audit-Github-Users).")
echo "NEW_ISSUE_URL=$new_issue_url" >> $GITHUB_ENV
- name: Comment on issue
run: gh issue comment $NEW_ISSUE_URL --body "@openedx/axim-oncall heads up on this request"
- name: Send custom JSON data to Slack workflow
id: slack
uses: slackapi/[email protected]
with:
webhook-type: webhook-trigger
# This data can be any valid JSON from a previous step in the GitHub Action
payload: |
{
"msg": "Time to run the quarterly user audit. ${{ env.NEW_ISSUE_URL }}"
}
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}