Skip to content

Force push the update-dependency branch - #339

Open
aaron-collier wants to merge 1 commit into
mainfrom
overwrite-stale-updates
Open

Force push the update-dependency branch#339
aaron-collier wants to merge 1 commit into
mainfrom
overwrite-stale-updates

Conversation

@aaron-collier

Copy link
Copy Markdown
Contributor

Sometimes we don't get update-dependency PRs when branches already exist. While the -B on the checkout gets a fresh branch locally, the push will fail if the branch already exists upstream.

This force-pushes the branch (updating any existing PR automatically) and creates a new PR only if one doesn't exist, silently captures any error and continuing if one does.

⚠️ Pull request merger! ⚠️
If this is only a minor change to the scripts, please 🔪 kill the Jenkins build. 🔪

Navigate from SUL CI ➡️ Stanford University Digital Library ➡️ access-update-scripts ➡️ Branches / main ➡️ Build History ➡️ Cancel build button (🆇)

@aaron-collier aaron-collier changed the title Force push the updat-dependency branch Force push the update-dependency branch Aug 21, 2026
Comment thread autupdate.sh
git push origin update-dependencies &&
hub pull-request -f -m "Update dependencies"
git push -f origin update-dependencies &&
hub pull-request -f -m "Update dependencies" 2>/dev/null || true

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Does this effectively say "if git push succeeds and PR creation fails, ignore the failure"?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yes, since it means there is already a PR and the force push has updated the branch for the existing PR, so all should be good.

@mjgiarlo mjgiarlo left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Approve pending consideration of question. Would also be good to get someone(s?) on @sul-dlss/access-team to take a look.

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