WIP: A script for merging a gitea PR #1

Draft
lee.miller wants to merge 1 commits from lee.miller/termux_devenv:gitea-merge into master
First-time contributor

Hi!

I started writing the script you asked for.

Hi! I started writing the script you asked for.
Owner

well you don't need to put it here but I guess it works for now

well you don't need to put it here but I guess it works for now
PeterSurda approved these changes 2022-04-26 13:35:39 +00:00
PeterSurda left a comment
Owner

Looks ok, I'll test it out when the next PR is up for merging.

Looks ok, I'll test it out when the next PR is up for merging.
Author
First-time contributor

It is just a halfway. I also have to check approving the PR and getting the status of checks.

It is just a halfway. I also have to check approving the PR and getting the status of checks.
Author
First-time contributor

Prerequisites:

  • the github repo is supposed to be cloned by ssh url
  • arguments: <gitea username>:<gitea password> <PR no> <github username>:<github access token>
Prerequisites: - the github repo is supposed to be cloned by ssh url - arguments: `<gitea username>:<gitea password> <PR no> <github username>:<github access token>`
lee.miller force-pushed gitea-merge from 18fbf900ed to 514f6433b2 2022-05-27 01:42:31 +00:00 Compare
Author
First-time contributor

You can probably test now on somewhat like Bitmessage/PyBitmessage#4. Currently it only checks github check runs, not all required statuses.

Also I guess opening a PR on github might be done by a buildbot task, triggered by merging a PR here.

You can probably test now on somewhat like https://git.bitmessage.org/Bitmessage/PyBitmessage/pulls/4. Currently it only checks github check runs, not all required statuses. Also I guess opening a PR on github might be done by a buildbot task, triggered by merging a PR here.
Owner

I'm now successfully using it, I store the credentials with pass, this allows them to be transparently extracted. There were also some minor changes needed (the repo I'm pushing to / calling API is not derived from my username but it's an organisation). And also some error handling is needed, sometimes the API rates are exceeded as buildbot + code quality + daily clone take a lot of API calls and github refuses to raise the limit for me, they don't even have a paid product that would allow this. But even if there is some temporary error, I can just rerun the script later without having to delete the temporary branches, and it will still work ok.

I'm now successfully using it, I store the credentials with `pass`, this allows them to be transparently extracted. There were also some minor changes needed (the repo I'm pushing to / calling API is not derived from my username but it's an organisation). And also some error handling is needed, sometimes the API rates are exceeded as buildbot + code quality + daily clone take a lot of API calls and github refuses to raise the limit for me, they don't even have a paid product that would allow this. But even if there is some temporary error, I can just rerun the script later without having to delete the temporary branches, and it will still work ok.
This pull request is marked as a work in progress.

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u gitea-merge:lee.miller-gitea-merge
git checkout lee.miller-gitea-merge

Merge

Merge the changes and update on Gitea.
git checkout master
git merge --no-ff lee.miller-gitea-merge
git checkout master
git merge --ff-only lee.miller-gitea-merge
git checkout lee.miller-gitea-merge
git rebase master
git checkout master
git merge --no-ff lee.miller-gitea-merge
git checkout master
git merge --squash lee.miller-gitea-merge
git checkout master
git merge --ff-only lee.miller-gitea-merge
git checkout master
git merge lee.miller-gitea-merge
git push origin master
Sign in to join this conversation.
No reviewers
No Label
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: PeterSurda/termux_devenv#1
No description provided.