Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

!test repro commit: Only commit if checksums differ to the ones on the branch #139

Merged
merged 2 commits into from
Mar 19, 2025

Conversation

CodeGat
Copy link
Member

@CodeGat CodeGat commented Mar 19, 2025

Closes #138

Background

If an earlier commit in a PR branch updates the checksums, and a later !test repro commit command finds that the base branch checksums differ, it will attempt to commit the new checksums. If these new checksums are actually identical to an earlier invocation of !test repro commit on the branch, it will fail to commit and push the changes.

This PR checks that changes are actually added before committing and pushing.

This PR

In this PR:

  • Only commit and push if there are actually checksums to add on this branch
  • Update the repro result comment

Testing

Tested the git status --porcelain (and indeed the whole step) locally to verify it is what we want. The --porcelain bit essentially makes the output machine-readable and never changes between versions of git, making it useful for scripts.

@CodeGat CodeGat added type:bug priority:high type:infra Dealing with CI/CD Pipelines labels Mar 19, 2025
@CodeGat CodeGat self-assigned this Mar 19, 2025
Copy link
Contributor

@atteggiani atteggiani left a comment

Choose a reason for hiding this comment

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

Overall looks good.
I just added a comment.

@CodeGat CodeGat requested a review from atteggiani March 19, 2025 04:01
Copy link
Contributor

@atteggiani atteggiani left a comment

Choose a reason for hiding this comment

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

LGTM

@CodeGat CodeGat merged commit 22e2cd1 into main Mar 19, 2025
@CodeGat CodeGat deleted the 138-exit-gracefully-on-identical-checksums-on-branch branch March 19, 2025 04:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority:high type:bug type:infra Dealing with CI/CD Pipelines
Projects
None yet
Development

Successfully merging this pull request may close these issues.

!test repro commit can't commit when the checksum in the repo is identical
2 participants