Skip to content

[Editorial Tools] Google Chats PR Announcer #611

[Editorial Tools] Google Chats PR Announcer

[Editorial Tools] Google Chats PR Announcer #611

name: "[Editorial Tools] Google Chats PR Announcer"
on:
workflow_dispatch:
schedule:
# Every morning at 9AM, Mondays to Fridays
- cron: "0 9 * * MON-FRI"
jobs:
# See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#example-defining-outputs-for-a-job
setup:
runs-on: ubuntu-latest
outputs:
repos: ${{ steps.main.outputs.repos }}
steps:
- id: main
run: |
REPOS=(
atom-maker
atom-workshop
crossword
crossword-status-checker
crossword-uploader
editorial-production-metrics
editions-card-builder
editorial-preferences
editorial-production-metrics
editorial-production-metrics-lib
editorial-tools-platform
editorial-tools-production-monitoring
editorial-tools-user-telemetry-service
editorial-viewer
facia-scala-client
facia-tool
flexible-content
flexible-feeds
flexible-model
flexible-octopus-converter
flexible-octopus-model
flexible-restorer
flexible-snapshotter
gustaf
interactive-basichartool
login.gutools
media-atom-maker
pan-domain-authentication
panda-hmac
path-manager
permissions
pinboard
presence-indicator
prosemirror-elements
prosemirror-invisibles
prosemirror-typerighter
rcs-poller-lambda
remote-machines
rights-feeder
s3-upload
# story-packages # bot is failing to parse response from this repo
tagmanager
targeting
targeting-client
teleporter
ten-four_quiz-builder
tools-index
typerighter
workflow
workflow-frontend
youtube-pfp-player-demo
)
RESULT=""
for repo in "${REPOS[@]}"; do
RESULT="$RESULT,guardian/$repo"
done
# remove leading ,
RESULT="${RESULT:1}"
echo "repos=$RESULT" >> $GITHUB_OUTPUT
prnouncer:
runs-on: ubuntu-latest
needs: setup
steps:
- name: Use GitHub App Token
uses: actions/create-github-app-token@v1
id: app-token
with:
# These values are for the GitHub App "Gu PRnouncer config"
# See https://github.com/organizations/guardian/settings/apps/gu-prnouncer-config (only accessible by GitHub owners)
app-id: ${{ secrets.APP_ID }}
private-key: ${{ secrets.PRIVATE_KEY }}
owner: guardian
- uses: guardian/actions-prnouncer@main
with:
google-webhook-url: ${{ secrets.EDITORIAL_TOOLS_GOOGLE_WEBHOOK_URL }}
github-repositories: ${{ needs.setup.outputs.repos }}
github-token: ${{ steps.app-token.outputs.token }} # A GitHub app token generated by the previous step
# Ignore PRs from dependabot, and snyk-bot as there are a LOT of PRs.
# See:
# - https://api.github.com/users/dependabot
# - https://api.github.com/users/snyk-bot
# TODO Address these PRs!
github-ignored-users: 49699333,19733683