Skip to content

Commit dc2eddc

Browse files
authored
comment back on the PR on cluster tests (#1114)
1 parent eb0556f commit dc2eddc

File tree

1 file changed

+21
-1
lines changed

1 file changed

+21
-1
lines changed

.github/workflows/pr_cluster_test.yml

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ on:
55
permissions:
66
contents: read
77
issues: read
8-
pull-requests: read
8+
pull-requests: write # To comment back on the PR
99
id-token: write
1010

1111
jobs:
@@ -43,6 +43,16 @@ jobs:
4343
- run: |
4444
number=$(echo '${{ needs.trigger_cluster_test_basic.outputs.result }}' | jq -r '.number')
4545
echo "Deploy scratchnet pipeline triggered for [Commit ${{ needs.get_head.outputs.sha }} in ${{ needs.get_head.outputs.repo }}](https://github.com/${{ github.repository }}/pull/${{ github.event.issue.number }}/files/${{ needs.get_head.outputs.sha }}), please approve it in CircleCI: https://app.circleci.com/pipelines/github/DACH-NY/canton-network-internal/${number}"
46+
- name: Comment on the PR
47+
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
48+
with:
49+
script : |
50+
await github.rest.issues.createComment({
51+
owner: context.repo.owner,
52+
repo: context.repo.repo,
53+
issue_number: context.issue.number,
54+
body: "Deploy cluster test triggered for [Commit ${{ needs.get_head.outputs.sha }} in ${{ needs.get_head.outputs.repo }}](https://github.com/${{ github.repository }}/pull/${{ github.event.issue.number }}/files/${{ needs.get_head.outputs.sha }}), please contact a Contributor to approve it in CircleCI: https://app.circleci.com/pipelines/github/DACH-NY/canton-network-internal/${number}"
55+
});
4656
4757
4858
trigger_cluster_test_hdm:
@@ -63,3 +73,13 @@ jobs:
6373
- run: |
6474
number=$(echo '${{ needs.trigger_cluster_test_hdm.outputs.result }}' | jq -r '.number')
6575
echo "Deploy scratchnet HDM pipeline triggered for [Commit ${{ needs.get_head.outputs.sha }} in ${{ needs.get_head.outputs.repo }}](https://github.com/${{ github.repository }}/pull/${{ github.event.issue.number }}/files/${{ needs.get_head.outputs.sha }}), please approve it in CircleCI: https://app.circleci.com/pipelines/github/DACH-NY/canton-network-internal/${number}"
76+
- name: Comment on the PR
77+
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
78+
with:
79+
script : |
80+
await github.rest.issues.createComment({
81+
owner: context.repo.owner,
82+
repo: context.repo.repo,
83+
issue_number: context.issue.number,
84+
body: "Deploy HDM pipeline triggered for [Commit ${{ needs.get_head.outputs.sha }} in ${{ needs.get_head.outputs.repo }}](https://github.com/${{ github.repository }}/pull/${{ github.event.issue.number }}/files/${{ needs.get_head.outputs.sha }}), please contact a Contributor to approve it in CircleCI: https://app.circleci.com/pipelines/github/DACH-NY/canton-network-internal/${number}"
85+
});

0 commit comments

Comments
 (0)