This is an automated email from the ASF dual-hosted git repository.
hdalsania pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/daffodil-vscode.git
The following commit(s) were added to refs/heads/main by this push:
new 65b96c3 fix: PR checkbox validation logic in workflow
65b96c3 is described below
commit 65b96c3988d90640c146faca07c532f3b4de3b6f
Author: Davin Shearer <[email protected]>
AuthorDate: Fri Jun 12 14:59:05 2026 -0400
fix: PR checkbox validation logic in workflow
Updated conditional check for pull request event and improved optional
chaining for pull request body.
---
.github/workflows/documentaion.yml | 12 +++---------
project/plugins.sbt | 2 +-
2 files changed, 4 insertions(+), 10 deletions(-)
diff --git a/.github/workflows/documentaion.yml
b/.github/workflows/documentaion.yml
index c38a2f7..7b29c9e 100644
--- a/.github/workflows/documentaion.yml
+++ b/.github/workflows/documentaion.yml
@@ -17,11 +17,6 @@
name: Enforce Documentation Checkbox
on:
- push:
- branches-ignore:
- - "main"
- - "dependabot/**" # dependabot branches
- - "update/**" # scala-steward branches
pull_request:
types: [opened, edited, synchronize, reopened]
branches-ignore:
@@ -30,7 +25,6 @@ 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:
@@ -38,12 +32,12 @@ jobs:
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 boxes before merging.");
} else {
core.info("✅ Required documentation checkbox is checked.");
}
diff --git a/project/plugins.sbt b/project/plugins.sbt
index 2042dcc..31150ce 100644
--- a/project/plugins.sbt
+++ b/project/plugins.sbt
@@ -17,7 +17,7 @@
addSbtPlugin("com.eed3si9n" % "sbt-buildinfo" % "0.13.1")
addSbtPlugin("com.github.sbt" % "sbt-native-packager" % "1.11.7")
-addSbtPlugin("org.typelevel" % "sbt-tpolecat" % "0.5.5")
+addSbtPlugin("org.typelevel" % "sbt-tpolecat" % "0.5.3")
addSbtPlugin("org.musigma" % "sbt-rat" % "0.7.0")
addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.5.6")
addSbtPlugin("org.scala-sbt.plugins" % "sbt-xjc" % "0.10")