Skip to content

Review Reminder

Review Reminder #9

name: Review Reminder
on:
schedule:
# Runs at midnight on January 1st and July 1st every year
- cron: '0 0 1 1,7 *'
workflow_dispatch: # Manual trigger option
permissions:
contents: write # Needed for creating issues and interacting with repos
issues: write # Needed to create and manage issues
jobs:
create-review-issue:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install GitHub CLI
run: sudo apt-get install gh
- name: Get team members and create issue
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh auth login
TEAM_MEMBERS=$(gh api orgs/yeatmanlab/teams/roar-infosec-maintainers/members --jq '.[].login')
ISSUE_BODY="It is time for the review of the Data Privacy and Information Security Manual and the Software Development Lifecycle Policies. Please ensure all sections are up to date and in compliance with current regulations. @yeatmanlab/roar-infosec-maintainers"
echo $TEAM_MEMBERS
echo $ISSUE_BODY
# Create the issue and mention the team
ISSUE_NUMBER=$(gh issue create --title "Review of Data Privacy and Information Security Manual" --body "$ISSUE_BODY" | tail -n1 | rev | cut -d/ -f 1 | rev)
echo ISSUE_NUMBER
echo $ISSUE_NUMBER
# Loop through each team member and assign them to the issue
for MEMBER in $TEAM_MEMBERS
do
echo $MEMBER
gh issue assign $ISSUE_NUMBER --assignee $MEMBER
done