This script automates the process of creating branches and PRs on the internal codebase of Espressif based on approved PRs on Github.
- When the PR is ready to merge after reviewing, the user needs to add a comment on the PR of the type
sha=1a2b3c4
wheresha
specifies the SHA1 hash (long or short) of the most recent commit to be merged/updated. - The PR is then affixed with a label
PR-Sync-Merge
,PR-Sync-Rebase
orPR-Sync-Update
, triggering the action of syncing the PR. (Labels can only be affixed by a user with an access level > TRIAGE in Github) - The
PR-Sync-Merge
label will create an internal PR by fetching the Github PR branch head and pushing it to the internal remote (for new PRs - close to the currentmaster
branch). This should be the preferred strategy while syncing. - The
PR-Sync-Rebase
label will create an internal PR by rebasing the Github PR on the latest internal master (for old PRs). - The
PR-Sync-Update
label will update the internal PR with new commits/changes on the PR fork branch. For triggering the update workflow after it has been already run once, remove and re-affix thePR-Sync-Update
label.
-
Behaviour when PR contains multiple commits (ref)
-
Handling of conflicts while using the rebase approach