@@ -2,42 +2,13 @@ name: Thank PR Author
22
33on :
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
118jobs :
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