Skip to content

Commit

Permalink
commit-validation CI - another attempt.
Browse files Browse the repository at this point in the history
  • Loading branch information
jgm committed Dec 27, 2023
1 parent 075cbb6 commit c33750c
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions .github/workflows/commit-validation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit c33750c

Please sign in to comment.