-
Notifications
You must be signed in to change notification settings - Fork 137
chore: upstream synchronization action for forks #425
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
base: 10.0.x
Are you sure you want to change the base?
Conversation
|
I've tested the workflow on my own set of repos and it works as intended. But I've few concerns:
Also, this needs corresponding documentation updates so contributors know how to set it up. Thank you, |
|
I've tested the workflow against my fork, but the action always skips. I think this is because I was already up to date when the action was run. I have to agree with @mannat2634 that we should keep the workflow triggers to |
There shouldn't be any errors if the branch isn't present upstream with github sync, I wasn't getting any errors in my test, were you getting different results?
It's just supposed to error, I can add a more verbose error message.
This workflow is done very quickly and should be computationally negligible, was this taking more than a second or two in your testing? Something like nodejs-ci should be using (at least) hundreds of times more action minutes. |
By this I meant often we branch off from master or 9.x. Then create a feature branch. Now, that feature branch isn't present in upstream and is new (it only has my changes). Now, this workflow will sync my branch to an absent branch. But I want this branch to stay in sync with master branch so I don't have to deal with merge conflicts later on merge. So I was suggesting we could have an option to mention which branch we want to keep in sync with. |
Description
Adds a workflow action to automatically sync branches with upstream. Synchronization is performed nightly at 12AM, on PR opening/closing, and commits into PR'd branches.
This ensures pull requests based off toth-tech branches can be merged upstream without risk of merge conflicts. Should also slightly reduce repo maintainer workload, as synchronization will be done automatically.
I'll mirror this PR to all the other doubtfire repositories if approved
IMPORTANT
This checks a github workflow variable which is disabled/undefined by default, a repo maintainer/administrator will need to create a github action variable
AUTOSYNC_UPSTREAMwith the valuetrueto enable this.Caveat
Ironically, this workflow would temporarily(?) break 1:1 parity with upstream as the script needs to be present in the target branch (currently 10.0.x). All that means is putting up with '1 commit ahead' until this is (hopefully) merged upstream. If this is too much of a concern though, I can try to get it merged upstream first.
Type of change
How Has This Been Tested?
Actions were ran sucessfully on fork. Functionality can be tested by opening a PR into a branch that contains this workflow (or triggering via cron). Once the action has been triggered once, it's registered in github actions and can be manually dispatched.
Checklist: