Skip to content

Commit f7cca75

Browse files
committed
333
1 parent 915a6c4 commit f7cca75

File tree

1 file changed

+5
-34
lines changed

1 file changed

+5
-34
lines changed

โ€Ž.github/workflows/pr_thanks_action.yamlโ€Ž

Lines changed: 5 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -2,42 +2,13 @@ name: Thank PR Author
22

33
on:
44
pull_request_target:
5-
branches: [ master ]
6-
types: [ opened, synchronize, reopened, ready_for_review ]
5+
types:
6+
- closed
77

8-
permissions:
9-
pull-requests: write
10-
#asdfasdf
118
jobs:
12-
thank-author:
9+
if_merged:
1310
if: github.event.pull_request.merged == true
1411
runs-on: ubuntu-latest
1512
steps:
16-
- name: Post a themed thank you comment
17-
uses: actions/github-script@v7
18-
with:
19-
github-token: ${{ secrets.GITHUB_TOKEN }}
20-
script: |
21-
const prNumber = context.payload.pull_request.number;
22-
const author = context.payload.pull_request.user.login;
23-
24-
const messages = [
25-
`๐ŸŒŒ **Houston, we have a merge!**\n@${author}, your PR just launched our codebase into another galaxy. ๐Ÿš€ Thanks, space cadet! ๐Ÿ‘ฉโ€๐Ÿš€`,
26-
27-
`๐Ÿพ **Purr-fect!**\n@${author}, your PR was smoother than a cat nap in the sun. Thanks for being pawsome! ๐Ÿ˜ธ๐Ÿพ`,
28-
29-
`๐Ÿ“ธ **"One does not simply... forget to thank @${author}."**\nYour code was strong, your style stronger. Much appreciated! ๐Ÿ’ช๐Ÿ’ป`,
30-
31-
`๐Ÿดโ€โ˜ ๏ธ **Ahoy, @${author}!**\nYer PR be merged with no bugs in sight. Ye be a true swashbucklinโ€™ dev! โ˜ ๏ธ๐Ÿฆœ Thanks, matey!`,
32-
33-
`๐ŸŽญ **Hark!**\nThou, @${author}, hath deliver'd thy pull request with great care and valor. Verily, we thank thee! ๐Ÿ“๐Ÿ™‡โ€โ™‚๏ธ`
34-
];
35-
36-
const message = messages[Math.floor(Math.random() * messages.length)];
37-
38-
await github.rest.issues.createComment({
39-
owner: context.repo.owner,
40-
repo: context.repo.repo,
41-
issue_number: prNumber,
42-
body: message
43-
});
13+
- run: |
14+
echo The PR was merged

0 commit comments

Comments
ย (0)