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

Allow pull requests from Github #30406

Closed
tobiasdiez opened this issue Aug 20, 2020 · 15 comments
Closed

Allow pull requests from Github #30406

tobiasdiez opened this issue Aug 20, 2020 · 15 comments

Comments

@tobiasdiez
Copy link
Contributor

I've heard that once upon a time there was a bot that created trac issues based on GitHub PRs. Apparently the bot was lost.

I found https://github.com/trac-hacks/trac-github which has the feature to "update the local git mirror used by Trac after each push to GitHub, and notify the new changesets to Trac;". Sounds like this is exactly what would be needed to allow PRs from github.
I couldn't find anything on how to install trac plugins here on sage.

Related:

Depends on #30363

CC: @embray @mkoeppe @robertwb @slel @williamstein

Component: misc

Issue created by migration from https://trac.sagemath.org/ticket/30406

@tobiasdiez tobiasdiez added this to the sage-9.2 milestone Aug 20, 2020
@davidlowryduda
Copy link
Contributor

comment:1

Is this functionality that we want? There are several warnings about how the sage github repo doesn't accept PRs and to instead use trac.

@davidlowryduda
Copy link
Contributor

comment:2

Ah, only now do I see that this is morally a continuation of the commentary occuring in #30363

@tobiasdiez
Copy link
Contributor Author

comment:3

Thanks for the link, I had forgotten where I read about the lost bot.

@embray
Copy link
Contributor

embray commented Aug 31, 2020

comment:4

We are accepting merge requests through GitLab: https://gitlab.com/sagemath/sage

The GitHub page should link to that.

@mkoeppe mkoeppe modified the milestones: sage-9.2, sage-9.3 Oct 24, 2020
@mkoeppe
Copy link
Contributor

mkoeppe commented Feb 13, 2021

comment:6

Setting new milestone based on a cursory review of ticket status, priority, and last modification date.

@mkoeppe mkoeppe modified the milestones: sage-9.3, sage-9.4 Feb 13, 2021
@slel
Copy link
Member

slel commented Mar 27, 2021

comment:7

The bot to turn pull requests to the SageMath repo at GitHub
into Trac tickets once existed.

In a 2014-08 sage-devel discussion, Robert described:

All pull requests on github turn into tickets, so this easy web
interface flow works now.

The bot stopped working around mid 2015.

In a 2016-07 sage-devel discussion, Paul wrote:

[...] there are a couple pull requests from the middle of 2015 that never became
Trac tickets. The bot appears to have stopped creating tickets before then.

There are open pull requests from the end of 2014 that became part of Sage 6.4.
The bot does not appear to close pull requests on GitHub.

and Robert wrote:

I was running a small script on trac.sagemath.org:12000 that was
listening for github pull requests and comments (via github webhooks)
and publishing them to trac (via the trac scripts shipped with Sage).
Nothing too fancy, but I can't find the code for it at the moment (but
it's probably still sitting in that image unless it's been redone
since then). I don't remember if I ever pushed anything back to github
(which would require write access) but pull requests should get closed
when their associated changes get merged into master.

In a 2018-02 discussion on the sagemath-admins mailing list, Robert wrote:

Sorry, I have no idea where the source to that is. However, the whole
thing was like 100 lines or so. It just listened for github hooks and
posted the information to a new/existing ticket on trac, and vice
versa (maybe was invoked via patchbot when something changed, I don't
remember how the hooks went the other direction).

At this point, probably less effort to re-implement than track it
down. Huge +1 to tighter github integration; using trac to push
changes at the very least is a huge barrier for casual development.
(I'm very happy with migrating Cython completely over to Github,
modulo I don't keep track of the jenkins server that used to regularly
build and test Sage with Cython head).

@slel
Copy link
Member

slel commented Mar 27, 2021

comment:8

Christopher Swenson pointed me to this:

https://github.com/swenson/sage-workflow/blob/master/sagedev/pr_export.py

@slel

This comment has been minimized.

@embray
Copy link
Contributor

embray commented Mar 29, 2021

comment:10

If you really want to do this I would recommend looking at the gitlab hook in the Trac plugin (ironically still hosted on GH though I would prefer to move it): https://github.com/sagemath/sage_trac_plugin/blob/master/sage_trac/gitlab.py

Most of this could be refactored to abstract out the GitLab and GitHub API differences. Personally I am not motivated to do it though.

@embray embray removed this from the sage-9.4 milestone Mar 29, 2021
@kwankyu
Copy link
Collaborator

kwankyu commented Sep 11, 2022

comment:12

Though we migrate to github, trac may function as a secondary issue tracker or at least archiver if this ticket is achieved. Or would we close trac completely after the migration?

@mkoeppe
Copy link
Contributor

mkoeppe commented Sep 11, 2022

comment:13

I would think we would probably keep Trac around in read-only mode for a little while, just so that people can easily see that nothing has been lost in the conversion. But definitely not more than that. Definitely not a converter from GH to Trac.

@mkoeppe
Copy link
Contributor

mkoeppe commented Sep 11, 2022

Dependencies: #30363

@williamstein
Copy link
Contributor

comment:15

We would not want to break links to trac somehow. Eg we could host all of trac.sagemath.org in static readonly mode (e.g via github pages) forever to preserve the links.

@mkoeppe
Copy link
Contributor

mkoeppe commented Sep 11, 2022

comment:16

Or set up http redirects to the Issues? The plan is to map them 1:1

@mkoeppe
Copy link
Contributor

mkoeppe commented Sep 11, 2022

comment:17

I've added these ideas to #30363, let's take the discussion there.

@mkoeppe mkoeppe closed this as not planned Won't fix, can't repro, duplicate, stale Feb 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants