Skip to content

fix: Update signed-commit action to fix issues with unstaged or conflicted files#22

Merged
fnesveda merged 1 commit into
mainfrom
fix/stage-files
May 19, 2026
Merged

fix: Update signed-commit action to fix issues with unstaged or conflicted files#22
fnesveda merged 1 commit into
mainfrom
fix/stage-files

Conversation

@fnesveda
Copy link
Copy Markdown
Member

The signed-commit action had two issues:

  1. if you pass pull: --rebase --autostash, and the pull happens after a retry, it unstages all staged changes, and nothing gets committed
  2. if there are conflicts caused by the git pull --rebase --autostash command, the action would happily commit the files with the conflicts

This fixes both of them by:

  1. Calling git add again after the git pull on a retry
  2. Explicitly checking if there are any files with merge conflicts after the pull and throwing an error in that case

Tests are generated by Claude, perhaps they're a bit overdone but this repo is so low traffic that it doesn't matter much.

@fnesveda fnesveda requested a review from vladfrangu May 19, 2026 16:41
@fnesveda fnesveda self-assigned this May 19, 2026
Copy link
Copy Markdown
Member

@vladfrangu vladfrangu left a comment

Choose a reason for hiding this comment

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

Lgtm but can we maybe autoadd based on what we had staged before pulling?

@fnesveda
Copy link
Copy Markdown
Member Author

It should add only what was passed to the add input, so the end result should be the same - I don't think git pull --rebase --autostash would end up with more changed files than were there beforehand.

@fnesveda fnesveda merged commit 5e8686c into main May 19, 2026
3 checks passed
@fnesveda fnesveda deleted the fix/stage-files branch May 19, 2026 16:48
fnesveda pushed a commit that referenced this pull request May 19, 2026
🤖 I have created a release *beep* *boop*
---


## [1.2.0](v1.1.2...v1.2.0)
(2026-05-19)


### Features

* Update of MongoDB index checker, prompt, deduplication, etc.
([#17](#17))
([86b91e4](86b91e4))


### Bug Fixes

* Update `signed-commit` action to fix issues with unstaged or
conflicted files ([#22](#22))
([5e8686c](5e8686c))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
fnesveda added a commit to apify/apify-actor-docker that referenced this pull request May 19, 2026
The `signed-commit` action did not handle retries on concurrent updates
well, causing some of the release workflows to silently not commit the
updated changes. The new version
[fixes](apify/actions#22) this.
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