aboutsummaryrefslogtreecommitdiff
path: root/.github/workflows/commit-validation.yml
diff options
context:
space:
mode:
authorJohn MacFarlane <[email protected]>2023-12-26 23:00:05 -0800
committerJohn MacFarlane <[email protected]>2023-12-26 23:00:22 -0800
commitc33750c4b23a790cf40187c885d0e318727e6c71 (patch)
tree77b36eadfaa137aafbab9fde2f01027bab82183f /.github/workflows/commit-validation.yml
parent075cbb6419d542022ac62e0a0c075685b41a9276 (diff)
commit-validation CI - another attempt.
Diffstat (limited to '.github/workflows/commit-validation.yml')
-rw-r--r--.github/workflows/commit-validation.yml8
1 files changed, 2 insertions, 6 deletions
diff --git a/.github/workflows/commit-validation.yml b/.github/workflows/commit-validation.yml
index a7ba07a73..252e7bfdd 100644
--- a/.github/workflows/commit-validation.yml
+++ b/.github/workflows/commit-validation.yml
@@ -16,12 +16,8 @@ jobs:
result-encoding: json
script: |
var longlines = 0;
- const commits = [];
- if (github.event.pull_request) {
- commits = ${{ toJSON(github.event.pull_request.commits) }};
- } else {
- commits = ${{ toJSON(github.event.commits) }};
- }
+ const pr = ${{ toJSON(github.event.pull_request) }};
+ const commits = (pr && pr.commits) || ${{ toJSON(github.event.commits) }};
for (const commit of commits) {
for (const line of commit.message.split('\n')) {
if (line.length > 78) {