Skip to content

Commit f2b7b29

Browse files
authored
Have rebase workflow Post a message when it starts (PowerShell#17341)
1 parent b0c16cb commit f2b7b29

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

.github/workflows/rebase.yml

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# This cannot rebase workflow changes into a PR
22
# It also only works if the GITHUB_TOKEN has permission to push to the branch
33
# see: https://github.com/cirrus-actions/rebase/issues/12#issuecomment-632594995
4-
on:
4+
on:
55
issue_comment:
66
types: [created]
77
name: Automatic Rebase
@@ -15,6 +15,17 @@ jobs:
1515
uses: actions/checkout@v2
1616
with:
1717
fetch-depth: 0
18+
- name: Post rebase started comment to pull request
19+
uses: actions/github-script@v3
20+
with:
21+
script: |
22+
const backport_start_body = `Started rebase: https://github.com/${context.repo.owner}/${context.repo.repo}/actions/runs/${process.env.GITHUB_RUN_ID}`;
23+
await github.issues.createComment({
24+
issue_number: context.issue.number,
25+
owner: context.repo.owner,
26+
repo: context.repo.repo,
27+
body: backport_start_body
28+
});
1829
- name: Automatic Rebase
1930
uses: cirrus-actions/rebase@1.6
2031
env:

0 commit comments

Comments
 (0)