From c78ff66bab8a8c964616a73c3f57efdf75e9b5ca Mon Sep 17 00:00:00 2001 From: Jamie Feingold Date: Tue, 25 Aug 2026 13:38:07 -0500 Subject: [PATCH 01/17] experimentation --- .github/workflows/jf-gha-caller.yml | 10 ++++++++++ .github/workflows/jf-gha-exp-callee.yml | 25 +++++++++++++++++++++++++ 2 files changed, 35 insertions(+) create mode 100644 .github/workflows/jf-gha-caller.yml create mode 100644 .github/workflows/jf-gha-exp-callee.yml diff --git a/.github/workflows/jf-gha-caller.yml b/.github/workflows/jf-gha-caller.yml new file mode 100644 index 0000000..a63985f --- /dev/null +++ b/.github/workflows/jf-gha-caller.yml @@ -0,0 +1,10 @@ +name: jf-gha-caller.yml +on: + pull_request: + types: [opened, edited, synchronize] + +jobs: + call-callee: + uses: ./.github/workflows/jf-gha-exp-callee.yml + with: + pr_number: ${{ github.event.pull_request.number }} diff --git a/.github/workflows/jf-gha-exp-callee.yml b/.github/workflows/jf-gha-exp-callee.yml new file mode 100644 index 0000000..e415e90 --- /dev/null +++ b/.github/workflows/jf-gha-exp-callee.yml @@ -0,0 +1,25 @@ +name: jf-gha-exp.yml +on: + workflow_call: + inputs: + pr_number: + description: The number of the pull request to operate on + required: true + type: number + +jobs: + read-comments: + runs-on: ubuntu-latest + permissions: + pull-requests: write + steps: + - name: Add a comment to the PR + uses: actions/github-script@v7 + with: + script: | + const comments = await github.rest.issues.listComments({ + owner: context.repo.owner, + repo: context.repo.repo, + issue_number: ${{ inputs.pr_number }} + }); + console.log(`COMMENT COUNT IS ${comments.length}`); From 32a4fc947fc0160147b0b6b31e98cb221927e659 Mon Sep 17 00:00:00 2001 From: Jamie Feingold Date: Tue, 25 Aug 2026 13:40:25 -0500 Subject: [PATCH 02/17] commit 2 From 673bef574231aed39956b59a785a34d8c315a60e Mon Sep 17 00:00:00 2001 From: Jamie Feingold Date: Tue, 25 Aug 2026 13:41:16 -0500 Subject: [PATCH 03/17] commit 3 From 902509b35411f8005c44bb1a233498d90bfc36a8 Mon Sep 17 00:00:00 2001 From: Jamie Feingold Date: Tue, 25 Aug 2026 13:51:32 -0500 Subject: [PATCH 04/17] commit 4 --- .github/workflows/jf-gha-exp-callee.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/jf-gha-exp-callee.yml b/.github/workflows/jf-gha-exp-callee.yml index e415e90..0eae801 100644 --- a/.github/workflows/jf-gha-exp-callee.yml +++ b/.github/workflows/jf-gha-exp-callee.yml @@ -15,11 +15,13 @@ jobs: steps: - name: Add a comment to the PR uses: actions/github-script@v7 + env: + PR_NUMBER: ${{ inputs.pr_number }} with: script: | - const comments = await github.rest.issues.listComments({ + const comments = await github.paginate(github.rest.issues.listComments, { owner: context.repo.owner, repo: context.repo.repo, - issue_number: ${{ inputs.pr_number }} + issue_number: Number(process.env.PR_NUMBER) }); console.log(`COMMENT COUNT IS ${comments.length}`); From bfde3e38f04179abcc8d51ed39a0b1968b84f8a3 Mon Sep 17 00:00:00 2001 From: Jamie Feingold Date: Tue, 25 Aug 2026 14:15:27 -0500 Subject: [PATCH 05/17] commit 5 --- .github/workflows/jf-gha-exp-callee.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/jf-gha-exp-callee.yml b/.github/workflows/jf-gha-exp-callee.yml index 0eae801..9b57d2d 100644 --- a/.github/workflows/jf-gha-exp-callee.yml +++ b/.github/workflows/jf-gha-exp-callee.yml @@ -25,3 +25,9 @@ jobs: issue_number: Number(process.env.PR_NUMBER) }); console.log(`COMMENT COUNT IS ${comments.length}`); + await github.rest.issues.createComment({ + owner: context.repo.owner, + repo: context.repo.repo, + issue_number: Number(process.env.PR_NUMBER), + body: 'Comment added by a machine! Beep boop!' + }); From 1669bdd49c034dca6f488d5072d237a27828301c Mon Sep 17 00:00:00 2001 From: Jamie Feingold Date: Tue, 25 Aug 2026 15:24:51 -0500 Subject: [PATCH 06/17] commit 6 --- .github/workflows/jf-gha-exp-callee.yml | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/.github/workflows/jf-gha-exp-callee.yml b/.github/workflows/jf-gha-exp-callee.yml index 9b57d2d..e2e177c 100644 --- a/.github/workflows/jf-gha-exp-callee.yml +++ b/.github/workflows/jf-gha-exp-callee.yml @@ -25,9 +25,7 @@ jobs: issue_number: Number(process.env.PR_NUMBER) }); console.log(`COMMENT COUNT IS ${comments.length}`); - await github.rest.issues.createComment({ - owner: context.repo.owner, - repo: context.repo.repo, - issue_number: Number(process.env.PR_NUMBER), - body: 'Comment added by a machine! Beep boop!' + const commentsByBot = comments.filter(comment => { + return comment.user.type === "Bot" }); + console.log(`FILTERED: ${JSON.stringify(commentsByBot, null, 2)}`); From e369006c8158132a440729927f06a5b79440c0af Mon Sep 17 00:00:00 2001 From: Jamie Feingold Date: Tue, 25 Aug 2026 15:35:25 -0500 Subject: [PATCH 07/17] commit 7 --- .github/workflows/jf-gha-exp-callee.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/jf-gha-exp-callee.yml b/.github/workflows/jf-gha-exp-callee.yml index e2e177c..552ddce 100644 --- a/.github/workflows/jf-gha-exp-callee.yml +++ b/.github/workflows/jf-gha-exp-callee.yml @@ -25,7 +25,10 @@ jobs: issue_number: Number(process.env.PR_NUMBER) }); console.log(`COMMENT COUNT IS ${comments.length}`); - const commentsByBot = comments.filter(comment => { + const filterFn = (comment) => { return comment.user.type === "Bot" + && comment.body === "Comment added by a machine! Beep boop!" + && comment.reactions.eyes >= 0 }); - console.log(`FILTERED: ${JSON.stringify(commentsByBot, null, 2)}`); + const commentsAcknowledgedByUser = comments.filter(filterFn); + console.log(`NUMBER OF FILTER COMMENTS IS ${commentsAcknowledgedByUser.length}`); From fbe56b045bff7157bd594b438c18872552702dd1 Mon Sep 17 00:00:00 2001 From: Jamie Feingold Date: Tue, 25 Aug 2026 15:50:21 -0500 Subject: [PATCH 08/17] commit 8 --- .github/workflows/jf-gha-exp-callee.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/jf-gha-exp-callee.yml b/.github/workflows/jf-gha-exp-callee.yml index 552ddce..76e34f2 100644 --- a/.github/workflows/jf-gha-exp-callee.yml +++ b/.github/workflows/jf-gha-exp-callee.yml @@ -29,6 +29,6 @@ jobs: return comment.user.type === "Bot" && comment.body === "Comment added by a machine! Beep boop!" && comment.reactions.eyes >= 0 - }); + }; const commentsAcknowledgedByUser = comments.filter(filterFn); console.log(`NUMBER OF FILTER COMMENTS IS ${commentsAcknowledgedByUser.length}`); From 7846d137f76ba4a91539e512f032ca3ec6527ea5 Mon Sep 17 00:00:00 2001 From: Jamie Feingold Date: Tue, 25 Aug 2026 15:54:07 -0500 Subject: [PATCH 09/17] commit 9 --- .github/workflows/jf-gha-exp-callee.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/jf-gha-exp-callee.yml b/.github/workflows/jf-gha-exp-callee.yml index 76e34f2..e44cb99 100644 --- a/.github/workflows/jf-gha-exp-callee.yml +++ b/.github/workflows/jf-gha-exp-callee.yml @@ -32,3 +32,4 @@ jobs: }; const commentsAcknowledgedByUser = comments.filter(filterFn); console.log(`NUMBER OF FILTER COMMENTS IS ${commentsAcknowledgedByUser.length}`); + console.log(JSON.stringify(commentsAcknowledgedByUser, null, 2)); From 6f79a2262e18932763095d81f18a97dfba3b823c Mon Sep 17 00:00:00 2001 From: Jamie Feingold Date: Tue, 25 Aug 2026 15:57:08 -0500 Subject: [PATCH 10/17] commit 10 --- .github/workflows/jf-gha-exp-callee.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/jf-gha-exp-callee.yml b/.github/workflows/jf-gha-exp-callee.yml index e44cb99..575bdbf 100644 --- a/.github/workflows/jf-gha-exp-callee.yml +++ b/.github/workflows/jf-gha-exp-callee.yml @@ -24,6 +24,12 @@ jobs: repo: context.repo.repo, issue_number: Number(process.env.PR_NUMBER) }); + await github.rest.issues.createComment({ + owner: context.repo.owner, + repo: context.repo.repo, + issue_number: Number(process.env.PR_NUMBER) + body: 'DIFFERENT MESSAGE, BLEEP BLOOP' + }); console.log(`COMMENT COUNT IS ${comments.length}`); const filterFn = (comment) => { return comment.user.type === "Bot" From 3d8cd71e85480ae05129668b7e11027967decf8b Mon Sep 17 00:00:00 2001 From: Jamie Feingold Date: Tue, 25 Aug 2026 15:57:50 -0500 Subject: [PATCH 11/17] commit 11 --- .github/workflows/jf-gha-exp-callee.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/jf-gha-exp-callee.yml b/.github/workflows/jf-gha-exp-callee.yml index 575bdbf..9805169 100644 --- a/.github/workflows/jf-gha-exp-callee.yml +++ b/.github/workflows/jf-gha-exp-callee.yml @@ -27,7 +27,7 @@ jobs: await github.rest.issues.createComment({ owner: context.repo.owner, repo: context.repo.repo, - issue_number: Number(process.env.PR_NUMBER) + issue_number: Number(process.env.PR_NUMBER), body: 'DIFFERENT MESSAGE, BLEEP BLOOP' }); console.log(`COMMENT COUNT IS ${comments.length}`); From 5908298881d542682971b57043168969efd7ada0 Mon Sep 17 00:00:00 2001 From: Jamie Feingold Date: Tue, 25 Aug 2026 16:00:29 -0500 Subject: [PATCH 12/17] commit 11 --- .github/workflows/jf-gha-exp-callee.yml | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/.github/workflows/jf-gha-exp-callee.yml b/.github/workflows/jf-gha-exp-callee.yml index 9805169..896dc04 100644 --- a/.github/workflows/jf-gha-exp-callee.yml +++ b/.github/workflows/jf-gha-exp-callee.yml @@ -24,17 +24,11 @@ jobs: repo: context.repo.repo, issue_number: Number(process.env.PR_NUMBER) }); - await github.rest.issues.createComment({ - owner: context.repo.owner, - repo: context.repo.repo, - issue_number: Number(process.env.PR_NUMBER), - body: 'DIFFERENT MESSAGE, BLEEP BLOOP' - }); console.log(`COMMENT COUNT IS ${comments.length}`); const filterFn = (comment) => { return comment.user.type === "Bot" && comment.body === "Comment added by a machine! Beep boop!" - && comment.reactions.eyes >= 0 + && comment.reactions.eyes > 0 }; const commentsAcknowledgedByUser = comments.filter(filterFn); console.log(`NUMBER OF FILTER COMMENTS IS ${commentsAcknowledgedByUser.length}`); From 0a1715ed3f4070810e211457b02c92a4f77f8806 Mon Sep 17 00:00:00 2001 From: Jamie Feingold Date: Wed, 26 Aug 2026 09:27:58 -0500 Subject: [PATCH 13/17] commit 12 --- .github/workflows/jf-gha-exp-callee.yml | 30 ++++++++++++++++++------- 1 file changed, 22 insertions(+), 8 deletions(-) diff --git a/.github/workflows/jf-gha-exp-callee.yml b/.github/workflows/jf-gha-exp-callee.yml index 896dc04..e7110a1 100644 --- a/.github/workflows/jf-gha-exp-callee.yml +++ b/.github/workflows/jf-gha-exp-callee.yml @@ -19,17 +19,31 @@ jobs: PR_NUMBER: ${{ inputs.pr_number }} with: script: | + const roboCommentBody = "This PR lacks any commits of the 'fix' or 'feat' type, and therefore will not trigger a release. To silence all further warnings, react to this warning comment (or any other) with the :eyes: emoji."; + const commits = await github.paginate(github.rest.pulls.listCommits, { + owner: context.repo.owner, + repo: context.repo.repo, + pull_number: Number(process.env.PR_NUMBER), + per_page: 100 + }); + const hasFixOrFeatCommits = commits.some(c => { + return c.commit.message.startsWith('fix') || c.commit.message.startsWith('feat'); + }); const comments = await github.paginate(github.rest.issues.listComments, { owner: context.repo.owner, repo: context.repo.repo, issue_number: Number(process.env.PR_NUMBER) }); - console.log(`COMMENT COUNT IS ${comments.length}`); - const filterFn = (comment) => { - return comment.user.type === "Bot" - && comment.body === "Comment added by a machine! Beep boop!" + const hasAcknowledgedRoboComment = comments.some(comment => { + return comment.user.type === 'Bot' + && comment.body === roboCommentBody && comment.reactions.eyes > 0 - }; - const commentsAcknowledgedByUser = comments.filter(filterFn); - console.log(`NUMBER OF FILTER COMMENTS IS ${commentsAcknowledgedByUser.length}`); - console.log(JSON.stringify(commentsAcknowledgedByUser, null, 2)); + }); + if (!hasFixOrFeatCommits && !hasAcknowledgedRoboComment) { + await github.rest.issues.createComment({ + owner: context.repo.owner, + repo: context.repo.repo, + issue_number: Number(process.env.PR_NUMBER), + body: roboCommentBody + }); + } From 67a2f6276235499a5127fd66b605cd6816e07b92 Mon Sep 17 00:00:00 2001 From: Jamie Feingold Date: Wed, 26 Aug 2026 09:28:35 -0500 Subject: [PATCH 14/17] commit 13 From 7e8532cc19b99ebdb35d4eb8ec1a592a75ec050f Mon Sep 17 00:00:00 2001 From: Jamie Feingold Date: Wed, 26 Aug 2026 09:29:09 -0500 Subject: [PATCH 15/17] commit 14 From f48fad6d6dd9116ef80f1c1f51fbe89319f0aabd Mon Sep 17 00:00:00 2001 From: Jamie Feingold Date: Wed, 26 Aug 2026 09:29:39 -0500 Subject: [PATCH 16/17] commit 15 From 4caeaaa8b4173c1165670db6c106593babd36057 Mon Sep 17 00:00:00 2001 From: Jamie Feingold Date: Wed, 26 Aug 2026 10:48:07 -0500 Subject: [PATCH 17/17] commit 14-overridden --- .github/workflows/jf-gha-exp-callee.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/jf-gha-exp-callee.yml b/.github/workflows/jf-gha-exp-callee.yml index e7110a1..ab5e37c 100644 --- a/.github/workflows/jf-gha-exp-callee.yml +++ b/.github/workflows/jf-gha-exp-callee.yml @@ -16,7 +16,7 @@ jobs: - name: Add a comment to the PR uses: actions/github-script@v7 env: - PR_NUMBER: ${{ inputs.pr_number }} + PR_NUMBER: ${{ github.event.pull_request.title }} with: script: | const roboCommentBody = "This PR lacks any commits of the 'fix' or 'feat' type, and therefore will not trigger a release. To silence all further warnings, react to this warning comment (or any other) with the :eyes: emoji.";