@@ -11,11 +11,9 @@ permissions:
1111
1212jobs :
1313 thank-you :
14- # Only run if the PR was actually merged
15- if : github.event.pull_request.merged
14+ if : github.event.pull_request.merged == true
1615 runs-on : ubuntu-latest
1716 steps :
18- # We must check out the code to read the MAINTAINERS.json file
1917 - name : Checkout repository
2018 uses : actions/checkout@v4
2119
@@ -26,29 +24,24 @@ jobs:
2624 const fs = require('fs');
2725 const creator = context.payload.pull_request.user.login;
2826
29- // Skip bots to avoid comment loops
3027 if (creator.endsWith('[bot]')) {
3128 console.log('Skipping bot account.');
3229 return;
3330 }
3431
35- // Read maintainers list from JSON file
3632 const maintainersData = JSON.parse(fs.readFileSync('MAINTAINERS.json', 'utf8'));
3733 const maintainers = maintainersData.maintainers.map(m => m.toLowerCase());
3834
39- // Skip core maintainers to avoid spamming the team
4035 if (maintainers.includes(creator.toLowerCase())) {
4136 console.log(`Skipping maintainer account: ${creator}`);
4237 return;
4338 }
4439
45- const message = ' Thank you for contributing to PipeCD! The changes in this pull request will be part of the upcoming release!' ;
40+ const message = ` Thank you for contributing to PipeCD, @${creator} ! The changes in this pull request will be part of the upcoming release!` ;
4641
47- // Post the comment to the PR
4842 await github.rest.issues.createComment({
4943 owner: context.repo.owner,
5044 repo: context.repo.repo,
5145 issue_number: context.payload.pull_request.number,
5246 body: message
5347 });
54-
0 commit comments