36
36
token : ${{ steps.generate-token.outputs.token || secrets.GITHUB_TOKEN }}
37
37
38
38
- name : Process CLA approval
39
+ id : process-cla-approval
39
40
uses : actions/github-script@v7
40
41
with :
41
42
github-token : ${{ steps.generate-token.outputs.token || secrets.GITHUB_TOKEN }}
@@ -88,24 +89,15 @@ jobs:
88
89
pull_number: prNumber
89
90
});
90
91
91
- // Verify the commenter is the PR author and the signature matches
92
+ // If someone other than PR author is trying to sign, silently ignore
92
93
if (commenter !== pr.user.login) {
93
- await github.rest.issues.createComment({
94
- owner: context.repo.owner,
95
- repo: context.repo.repo,
96
- issue_number: prNumber,
97
- body: `@${commenter} Only the PR author (@${pr.user.login}) can sign the CLA for this pull request.`
98
- });
94
+ console.log(`Comment with CLA text from ${commenter} (not PR author ${pr.user.login}), ignoring silently`);
99
95
return;
100
96
}
101
97
98
+ // If PR author is signing but signature doesn't match their username, silently ignore
102
99
if (signatureUser !== commenter) {
103
- await github.rest.issues.createComment({
104
- owner: context.repo.owner,
105
- repo: context.repo.repo,
106
- issue_number: prNumber,
107
- body: `@${commenter} The CLA signature must match your username. Please use: \`CLA-SIGNATURE: ${commenter}\``
108
- });
100
+ console.log(`PR author ${commenter} used incorrect signature '${signatureUser}', ignoring silently`);
109
101
return;
110
102
}
111
103
@@ -219,6 +211,8 @@ jobs:
219
211
core.setOutput('pr_author', prAuthor);
220
212
core.setOutput('approved_by', approvedBy);
221
213
214
+ console.log(`Outputs set - pr_number: ${prNumber}, pr_author: ${prAuthor}, approved_by: ${approvedBy}`);
215
+
222
216
// Check if confirmation comment already exists
223
217
const comments = await github.rest.issues.listComments({
224
218
issue_number: prNumber,
@@ -228,7 +222,7 @@ jobs:
228
222
229
223
const confirmationExists = comments.data.some(comment =>
230
224
(comment.user.login === 'github-actions[bot]' || comment.user.type === 'Bot') &&
231
- comment.body.includes('CLA Agreement Confirmed ')
225
+ comment.body.includes('Trademark addendum agreement confirmed ✅ ')
232
226
);
233
227
234
228
if (!confirmationExists) {
@@ -239,7 +233,7 @@ jobs:
239
233
owner: context.repo.owner,
240
234
repo: context.repo.repo,
241
235
issue_number: prNumber,
242
- body: `## CLA Agreement Confirmed
236
+ body: `## Trademark license agreement confirmed
243
237
244
238
The trademark license agreement has been approved for @${prAuthor}.
245
239
0 commit comments