Skip to content

feat: display list of commits being tested - #7

Merged
agherzan merged 2 commits into
canonical:mainfrom
agherzan:ag/commits
Jul 22, 2026
Merged

feat: display list of commits being tested#7
agherzan merged 2 commits into
canonical:mainfrom
agherzan:ag/commits

Conversation

@agherzan

Copy link
Copy Markdown
Collaborator

Show abbreviated SHA and first line of each commit message before running checks. Makes it clear which commits are being validated.

Example output:
Testing 3 commits:
134af565 feat: support short SHAs and symbolic git references
6ab42b7a feat: add --skip-merge-commits flag
2991d58 chore: migrate repository references

@agherzan agherzan self-assigned this Jul 13, 2026
Copilot AI review requested due to automatic review settings July 13, 2026 13:56

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds a pre-check log output that lists the commits being validated (abbreviated SHA + first line of commit message), improving transparency when running the action/CLI.

Changes:

  • Add display_commits() in src/main.rs and invoke it before running checks.
  • Expose abbreviate_sha() from the library so the binary can reuse the same abbreviation logic.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
src/main.rs Prints a human-readable list of commits to be tested before running validations.
src/lib.rs Makes abbreviate_sha public for reuse by the binary.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/lib.rs
@agherzan
agherzan force-pushed the ag/commits branch 2 times, most recently from d547626 to 4f0f41f Compare July 17, 2026 13:01
agherzan added 2 commits July 22, 2026 14:13
Show abbreviated SHA and first line of each commit message before
running checks. Makes it clear which commits are being validated.

Example output:
  Testing 3 commits:
    134af565 feat: support short SHAs and symbolic git references
    6ab42b7a feat: add --skip-merge-commits flag
    2991d58 chore: migrate repository references

Signed-off-by: Andrei Gherzan <andrei.gherzan@canonical.com>
Replace manual bounds checking with str::get() which returns None
for out-of-bounds access, making the code more idiomatic.

Signed-off-by: Andrei Gherzan <andrei.gherzan@canonical.com>

@pedoch pedoch left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@agherzan
agherzan merged commit 4ce3d7f into canonical:main Jul 22, 2026
4 checks passed
@agherzan
agherzan deleted the ag/commits branch July 22, 2026 19:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants