You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@daffodil.apache.org by "scholarsmate (via GitHub)" <gi...@apache.org> on 2026/06/12 19:00:47 UTC
[PR] fix: PR checkbox validation logic in workflow [daffodil-vscode]
scholarsmate opened a new pull request, #1718:
URL: https://github.com/apache/daffodil-vscode/pull/1718
Updated conditional check for pull request event and improved optional chaining for pull request body.
- [x] I have determined that no documentation updates are needed for these changes
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@daffodil.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] fix: PR checkbox validation logic in workflow [daffodil-vscode]
Posted by "Copilot (via GitHub)" <gi...@apache.org>.
Copilot commented on code in PR #1718:
URL: https://github.com/apache/daffodil-vscode/pull/1718#discussion_r3405654868
##########
.github/workflows/documentaion.yml:
##########
@@ -30,18 +30,17 @@ on:
jobs:
enforce-checkbox:
- # this if is to further ensure that this job won't run on dependabot or scala-steward PRs
- if: ${{ !startsWith(github.head_ref, 'dependabot/') && !startsWith(github.head_ref, 'update/') }}
+ if: ${{ github.event_name == 'pull_request' && !startsWith(github.head_ref, 'dependabot/') && !startsWith(github.head_ref, 'update/') }}
Review Comment:
The workflow still triggers on `push`, but this job now only runs for `pull_request` events. That means every matching push will create a workflow run with all jobs skipped, which adds noise and uses CI resources without doing any work. Consider either removing the `on: push` trigger or adjusting the job logic so pushes are handled intentionally (e.g., a different job/condition).
##########
.github/workflows/documentaion.yml:
##########
@@ -30,18 +30,17 @@ on:
jobs:
enforce-checkbox:
- # this if is to further ensure that this job won't run on dependabot or scala-steward PRs
- if: ${{ !startsWith(github.head_ref, 'dependabot/') && !startsWith(github.head_ref, 'update/') }}
+ if: ${{ github.event_name == 'pull_request' && !startsWith(github.head_ref, 'dependabot/') && !startsWith(github.head_ref, 'update/') }}
runs-on: ubuntu-22.04
steps:
- name: Check required confirmation checkbox
uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v7
with:
script: |
- const prBody = context.payload.pull_request.body || "";
+ const prBody = context.payload.pull_request?.body || "";
const checkbox1Text = "- [x] I have determined that no documentation updates are needed for these changes";
const checkbox2Text = "- [x] I have added the following documentation for these changes";
-
+
if (!prBody.includes(checkbox1Text) && !prBody.includes(checkbox2Text)) {
core.setFailed("❌ Required documentation checkbox not checked. Please check one of the the box before merging.");
Review Comment:
The failure message has a grammatical typo ("one of the the box"), which is user-facing and may be confusing. Suggest correcting it.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@daffodil.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] fix: PR checkbox validation logic in workflow [daffodil-vscode]
Posted by "Copilot (via GitHub)" <gi...@apache.org>.
Copilot commented on code in PR #1718:
URL: https://github.com/apache/daffodil-vscode/pull/1718#discussion_r3405688504
##########
.github/workflows/documentaion.yml:
##########
@@ -30,20 +25,19 @@ on:
jobs:
enforce-checkbox:
- # this if is to further ensure that this job won't run on dependabot or scala-steward PRs
if: ${{ !startsWith(github.head_ref, 'dependabot/') && !startsWith(github.head_ref, 'update/') }}
runs-on: ubuntu-22.04
steps:
- name: Check required confirmation checkbox
uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v7
with:
script: |
- const prBody = context.payload.pull_request.body || "";
+ const prBody = context.payload.pull_request?.body || "";
const checkbox1Text = "- [x] I have determined that no documentation updates are needed for these changes";
const checkbox2Text = "- [x] I have added the following documentation for these changes";
-
+
if (!prBody.includes(checkbox1Text) && !prBody.includes(checkbox2Text)) {
- core.setFailed("❌ Required documentation checkbox not checked. Please check one of the the box before merging.");
+ core.setFailed("❌ Required documentation checkbox not checked. Please check one of the the boxes before merging.");
Review Comment:
The failure message contains a duplicated word ("the the"), which reads unpolished in a user-facing error.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@daffodil.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] fix: PR checkbox validation logic in workflow [daffodil-vscode]
Posted by "hdalsania (via GitHub)" <gi...@apache.org>.
hdalsania merged PR #1718:
URL: https://github.com/apache/daffodil-vscode/pull/1718
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@daffodil.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org