Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge PR through github API #2

Open
tobiasdiez opened this issue Feb 19, 2023 · 9 comments
Open

Merge PR through github API #2

tobiasdiez opened this issue Feb 19, 2023 · 9 comments

Comments

@tobiasdiez
Copy link

Currently,

log.info(f'Merging {self.pr}')
branch_tip = self.branch_tip.oid
self.repo.merge(branch_tip)
user = self.repo.default_signature
tree = self.repo.index.write_tree()
message = self.message
merge_commit = self.repo.create_commit(
'HEAD', user, user, message, tree,
[self.repo.head.target, branch_tip])
if self.repo.index.conflicts:
raise MergeConflictException(self.pr.number)
self.repo.state_cleanup()
return merge_commit
only creates a commit but not (directly) merges the PR. Here is the API for it: https://docs.github.com/en/rest/pulls/pulls?apiVersion=2022-11-28#merge-a-pull-request

@vbraun
Copy link
Member

vbraun commented Feb 20, 2023

Yes because I currently run the buildbot with the merge commit and only push it to develop if the checks pass. A bit like a merge queue.

@tobiasdiez
Copy link
Author

At sagemath/sage#35062, I'm proposing to activate github's new merge queue feature. What would be needed to make this equivalent to your current setup using the buildbot?

@vbraun
Copy link
Member

vbraun commented Feb 21, 2023

I haven't used it but the real task is to set up CI that adequately covers the supported platforms, not turning on the merge queue feature.

@mkoeppe
Copy link

mkoeppe commented Feb 21, 2023

What platforms do you test, Volker?

@vbraun
Copy link
Member

vbraun commented Feb 21, 2023

I'm apparently building some platform-independent parts that aren't covered by the current ci, e.g. pdf docs

The builders are here: http://build.sagemath.org/#/builders

@mkoeppe
Copy link

mkoeppe commented Feb 21, 2023

On that page, where does one see what system packages are installed, and how you configure the build?

@mkoeppe
Copy link

mkoeppe commented Feb 21, 2023

Yes, we should add a PDF doc builder to the CI that runs for every ticket.

@vbraun
Copy link
Member

vbraun commented Feb 25, 2023

The buildbot workers are all minimal installations, the worker configuration is in https://github.com/sagemath/buildbot-sage/blob/master/sage_bot/workers.py

@mkoeppe
Copy link

mkoeppe commented Feb 26, 2023

Thanks, I'll take a look.

By the way, a PDF builder is added in sagemath/sage#35169

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants