fix(ci): Update existing flake.lock PR if it exists already#468
Merged
Conversation
edif2008
approved these changes
Apr 24, 2025
edif2008
left a comment
Member
There was a problem hiding this comment.
Thank you for your contribution! 😄
This definitely looks like a great improvement that we should have to keep things nice and clean.
Member
Author
|
Heh, I kinda forgot about this. We should probably try to merge this soon as our |
4 tasks
volodymyrZotov
approved these changes
Aug 25, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview
If a
flake.lockautomated PR already exists and hasn't been merged by the time a new job runs to create a new PR, it updates the existing PR instead of trying to create a new PR and failing because the branch already exists.Type of change
Related Issue(s)
flake.lockupdate job should update the existing PR if an unmerged one exists #467How To Test
Read the changed bash script and ensure it makes sense. You can also test out the logic locally on a test repo. The thinking in the first few lines (the first
ifblock) is:flake.lock(this is to ensure we can push new changes, e.g. a commit exists on remote that we don't have locally)nix flake update, which now runs on the latest version of the file from the branchChangelog
Update
flake.lockCI automation to update existing PR if there is one.