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.
lee.miller added 1 commit 2022-04-22 23:50:57 +00:00
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.
lee.miller added 1 commit 2022-05-18 23:38:27 +00:00
8e1666b05a
Fix errors:
- propose only open PRs from gitea
  - use ssh_url - both repos should have ssh urls
  - exit if pull failed
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 added 1 commit 2022-05-24 23:55:46 +00:00
lee.miller added 1 commit 2022-05-27 01:28:21 +00:00
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.
You can also view command line instructions.

Step 1:

From your project repository, check out a new branch and test the changes.
git checkout -b lee.miller-gitea-merge master
git pull gitea-merge

Step 2:

Merge the changes and update on Gitea.
git checkout master
git merge --no-ff 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.