Skip to content

Notify owners with a summary about open issues and PRs #54

Notify owners with a summary about open issues and PRs

Notify owners with a summary about open issues and PRs #54

Workflow file for this run

name: Notify owners with a summary about open issues and PRs
on:
schedule:
- cron: "0 7 * * 1"
jobs:
build:
if: ${{ github.repository == "aws/aws-nitro-enclaves-cli" }}

Check failure on line 9 in .github/workflows/summary.yml

View workflow run for this annotation

GitHub Actions / Notify owners with a summary about open issues and PRs

Invalid workflow file

The workflow is not valid. .github/workflows/summary.yml (Line: 9, Col: 9): Unexpected symbol: '"aws/aws-nitro-enclaves-cli"'. Located at position 22 within expression: github.repository == "aws/aws-nitro-enclaves-cli"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: create summary
run: |
# Get list of open PRs through GH CLI formatting by columns
# and store the output to PRS_CONTENT environment variable
echo 'PRS_CONTENT<<EOF' >> $GITHUB_ENV
gh pr list --json title,updatedAt,labels,assignees,url --template \
'{{ printf "URL\tTitle\tLast updated\n"}}{{range .}}{{printf "%s\t%s\t%s\n" .url .title (timeago .updatedAt)}}{{end}}' | column -ts $'\t' >> $GITHUB_ENV
echo 'EOF' >> $GITHUB_ENV
# Get list of open issues through GH CLI formatting by columns
# and store the output to ISSUES_CONTENT environment variable
echo 'ISSUES_CONTENT<<EOF' >> $GITHUB_ENV
gh issue list --json title,updatedAt,labels,assignees,url --template \
'{{ printf "URL\tTitle\tLast updated\n"}}{{range .}}{{printf "%s\t%s\t%s\n" .url .title (timeago .updatedAt)}}{{end}}' | column -ts $'\t' >> $GITHUB_ENV
echo 'EOF' >> $GITHUB_ENV
# Fetch repository name and store it to
# REPOSITORY_NAME environment variable
echo "REPOSITORY_NAME=$(echo '${{ github.repository }}' | awk -F '/' '{print $2}')" >> $GITHUB_ENV
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: notify
run: |
# Send open PRs and issues lists from corresponding environment variables to a dedicated webhook URL
curl -d '{ "repo": "${{ env.REPOSITORY_NAME }}", "prs": "${{ env.PRS_CONTENT }}", "issues": "${{ env.ISSUES_CONTENT }}" }' ${{ secrets.SUMMARY_WEBHOOK_URL }}