Skip to content

Show commit check results in branch order #39

Open

Description

The commit message checker currently reports results in reverse branch order, starting with the newest commit.

This makes the output harder to follow when reviewing a series of commits, since the results appear in the opposite order to which the commits were added to the branch.

Instead it would be clearer if we reverse the output so that commits are reported in branch order, starting with the first commit. It may also make sense to check the commits in the same order they are reported, if this is not already the case.

The commit message validation rules remain unchanged.

In my local checkout, the branch commit history looks like this:

$ git log --oneline main...HEAD
98640ddc gfd
af12b15a test
72156fd5 (HEAD) test

while the output of script shows the same commit list, just reversed:

Check commit messages
0s
Run python "$GITHUB_ACTION_PATH/check_commits.py" \
  ✅ Commit 72156fd58d68a405d931f7690eaebfb4f3f8c21c passed all checks.
 ❌ Errors in commit af12b15a1acf789cc034016d25b4f8b273e600a3
 ❌ Errors in commit 98640ddc439e0bf72c1352f393d962ed1abfa449
  Error: Process completed with exit code 1.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions