Skip to content

Commit b3a8d0c

Browse files
committed
fix bug in workflow-authentication comments
1 parent 59715ca commit b3a8d0c

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

.github/workflows/trademark-cla-approval.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ permissions: write-all
1717
jobs:
1818
process-cla-approval:
1919
runs-on: ubuntu-latest
20-
if: github.event_name == 'workflow_dispatch' || github.event.label.name == 'cla-signed' || github.event_name == 'issue_comment'
20+
if: github.event_name == 'workflow_dispatch' || (github.event_name == 'pull_request_target' && github.event.label.name == 'cla-signed' && github.actor != 'github-actions[bot]') || github.event_name == 'issue_comment'
2121

2222
steps:
2323

@@ -123,6 +123,7 @@ jobs:
123123
}
124124
125125
// For non-comment approvals, check if the person has the right permissions
126+
console.log(`isCommentApproval: ${isCommentApproval}, context.eventName: ${context.eventName}, context.actor: ${context.actor}`);
126127
if (!isCommentApproval) {
127128
try {
128129
const { data: collaboration } = await github.rest.repos.getCollaboratorPermissionLevel({

.github/workflows/trademark-cla-notice.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -170,8 +170,8 @@ jobs:
170170
171171
if (!existingClaComment && context.eventName === 'pull_request_target') {
172172
const claText = '# Trademark License Addendum\n\n' +
173-
'Merging of this pull request is temporarily blocked as it potentially
174-
'contains a contribution containing a trademark. Please \n' +
173+
'Merging of this pull request is temporarily blocked as it potentially ' +
174+
'contains a contribution containing a trademark. git diffPlease \n' +
175175
'read and agree to the Trademark License Addendum below to \n' +
176176
'unblock merging of this pull request.\n\n' +
177177
'<details>\n' +

0 commit comments

Comments
 (0)