-
Notifications
You must be signed in to change notification settings - Fork 174
36 lines (32 loc) · 1.3 KB
/
message_zulip_on_prs.yml
File metadata and controls
36 lines (32 loc) · 1.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
name: Message Zulip when a PR is opened
on:
pull_request_target:
types: [opened, reopened]
jobs:
run-script:
runs-on: ubuntu-latest
if: github.repository == 'leanprover-community/leanprover-community.github.io'
steps:
- name: Produce message
id: zulip_message
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
AUTHOR: ${{ github.event.pull_request.user.login }}
PR_NUMBER: ${{ github.event.pull_request.number }}
PR_TITLE: ${{ github.event.pull_request.title }}
run: |
printf $'message<<EOF\n' | tee -a "${GITHUB_OUTPUT}"
printf '%s opened PR website#%s:\n' "${AUTHOR}" "${PR_NUMBER}" | tee -a "${GITHUB_OUTPUT}"
printf '> %s\n' "${PR_TITLE}" | tee -a "${GITHUB_OUTPUT}"
printf $'EOF\n' | tee -a "${GITHUB_OUTPUT}"
- name: Post message to Zulip
uses: zulip/github-actions-zulip/send-message@e4c8f27c732ba9bd98ac6be0583096dea82feea5 # v1.0.2
with:
api-key: ${{ secrets.REPO_UPDATE_ZULIP_TOKEN }}
email: 'leanprover-community-repo-update-bot@leanprover.zulipchat.com'
organization-url: 'https://leanprover.zulipchat.com'
to: 'mathlib reviewers'
type: 'stream'
topic: 'blog and website PRs'
content: |
${{ steps.zulip_message.outputs.message }}