nextcloud / backportbot Goto Github PK
View Code? Open in Web Editor NEWA bot designed to streamline the process of backporting pull requests or specific commits to older branches
License: GNU Affero General Public License v3.0
A bot designed to streamline the process of backporting pull requests or specific commits to older branches
License: GNU Affero General Public License v3.0
While manually backporting nextcloud/documentation#11565 I notice that git can't automatically cherry-pick the full changes to stable27. Locally I use kdiff3 as mergetool and running "git mergetool" resolves conflicts without my help. So it would be quite cool if the bot could resolve those as well. We might just want to show a warning that there were conflicts and those were resolved automatically.
I know it is called backport bot, but a "rebase" command would be great, same like dependany bot has it.
dependabot
Bot posted a message after creating a backport (If I understand it correclty, when trying to assign dependabot on a new PR):
The backport to `stable28` failed. Please do this backport manually.
...
Error: Failed to create pull request: Failed to request reviews: Reviews may only be requested from collaborators.
One or more of the users or teams you specified is not a collaborator of the nextcloud/spreed repository.
Reviews were requested, but PR is processed without any person assigned.
Maybe we could keep in memory a person who triggered a PR, and assign him as a fallback?
Maybe the bot should not be useable by everybody but only members of a given team
Adjust backport bot message to
Add [ci skip]
to backport commits if we detect conflicts.
https://docs.github.com/en/actions/managing-workflow-runs/skipping-workflow-runs
https://www.google.com/search?hl=en&q=drone%20ci%20skip%20ci
Example: nextcloud/documentation#1871
/app/node_modules/@octokit/request/dist-node/index.js:156
throw new import_request_error.RequestError(message, 500, {
^
RequestError [HttpError]: other side closed
at /app/node_modules/@octokit/request/dist-node/index.js:156:11
at addReaction (/app/src/githubUtils.ts:37:2) {
status: 500,
request: {
method: 'POST',
url: 'https://api.github.com/repos/nextcloud/server/issues/comments/1953680517/reactions',
headers: {
accept: 'application/vnd.github.v3+json',
'user-agent': 'octokit-rest.js/20.0.2 octokit-core.js/5.0.2 Node.js/20.11.1 (linux; x64)',
authorization: 'token [REDACTED]',
'content-type': 'application/json; charset=utf-8'
},
body: '{"content":"+1"}',
request: { hook: [Function: bound bound register] }
}
}
The labels should be copied over (except for some special ones like the "3. to review") in case of the Nextcloud repos.
Instead it should open the PR so that users can fix the backport and merge it.
Otherwise/currently they have to do the backport manually again.
So if there was no "/backport to โฆ" nor "/backport no" the bot should asks:
Is a backport needed?
if no, you can prevent this message in the future by leaving a `/backport no` comment.
With latest version, I sometimes see that a backport is missing parts of the commits.
This is dangerous and a drawback than before (where backport had to be done entirely manually in case of a conflict).
I think it is better to not use --strategy ours, but rather commit the merge conflict, so that we can solve it manually.
Because it makes people lose time when trying to find out which parts to fix.
Usually the workaround is to discard the backport completely and cherry-pick everything again. That can be a waste of time if the conflict is only in a small file when dealing with big PRs.
Probably because there is no icon set for the app: https://github.com/apps/backportbot-nextcloud
Ask the same people as on the original pr to review
If the backport label is already set a new comment should not remove it
Failed to create pull request: Validation Failed:
{
"resource":"PullRequest",
"code":"custom",
"message":"A pull request already exists for nextcloud-libraries:backport/5282/next."
}
Else it does ๐ฅ
For example, when the mentioned branch does not exist
Otherwise everyone is requested for review while the PR is not mergeable until the author took care of the conflicts
That way we can use the compile bot to amend but still backport the commit changes only :)
/backport 589fh4cds to stable16
Doesn't seem to happen all the time, maybe there is something in the logs?
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.