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

Clean dirty state before checkout #220

Merged
merged 6 commits into from
Mar 18, 2024
Merged

Conversation

ofalvai
Copy link
Contributor

@ofalvai ofalvai commented Mar 13, 2024

Checklist

  • I've read and followed the Contribution Guidelines
  • step.yml and README.md is updated with the changes (if needed)

Version

Requires a MAJOR/MINOR/PATCH version update

Context

When running on self-hosted agents, a previous merge conflict could leave the working tree in a dirty state. The step needs to do a reset before the checkout.

Changes

  • Detect if the working tree is dirty
  • Do a reset and clean if so
  • Handle errors gracefully and continue execution. It's possible that either a reset or a clean is enough, depending on the working tree state.

Investigation details

Decisions

@ofalvai ofalvai marked this pull request as ready for review March 14, 2024 12:14
@ofalvai ofalvai merged commit cacdd02 into master Mar 18, 2024
1 check passed
@ofalvai ofalvai deleted the BE-1355-clean-dirty-state branch March 18, 2024 08:18
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.

2 participants