Sync two repositories by cherry-picking upstream commits into downstream
qbarrand / gitstream Goto Github PK
View Code? Open in Web Editor NEWSync two repositories by cherry-picking upstream commits into downstream
License: Apache License 2.0
Sync two repositories by cherry-picking upstream commits into downstream
License: Apache License 2.0
When we are backporting multiple commits that depend on one another, those changes should be committed downstream in the same order to increase the chances of success. To maintain that order, the tool should make all PRs drafts except the most ancient one.
The code is running in the m/s repo context and adding a remote to the u/s repo. Then it is fetching the remote content into a local branch.
This branch may be used in order to read the OWNERS file locally instead of triggering a github API call to read the content.
ybettan gitstream (main) $ echo $Q
hash:4343445d777ac4259491bf98962c43e34a47641f repo:kubernetes-sigs/kernel-module-management
ybettan gitstream (main) $ curl -L -H "Accept: application/vnd.github+json" https://api.github.com/search/commits?q=${Q}
{
"total_count": 1,
"incomplete_results": false,
"items": [
{
"url": "https://api.github.com/repos/kubernetes-sigs/kernel-module-management/commits/4343445d777ac4259491bf98962c43e34a47641f",
"sha": "4343445d777ac4259491bf98962c43e34a47641f",
...
}
]
}
curl: (3) URL using bad/illegal format or missing URL
Sometimes we get the following error while searching for a commit using the Github API:
403 You have exceeded a secondary rate limit. Please wait a few minutes before you try again."
This may also happens in other API calls and we missed it.
Job example that get this error (Assign PRs and issues to the upstream commit author
step).
Currently, the presence of an OWNERS
file in the downstream repository is mandatory to use the auto-assign feature. We should make the assignee validation with the OWNERS
file optional with a CLI flag.
We should return an error in case we didn't find the author in the OWNERS file only if there is no other assignee already assigned to the issue.
When the cherry-pick does not apply correctly, try creating a PR instead of an issue.
Make gitstream add comments about how the assignee for the issue/PR were chosen for visibility.
Searching by email implies that the author must make sure his primary email on github is the same as the one in his local .git/config
file which is inconvenient.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.