Opened 21 months ago

Last modified 14 months ago

#30406 new task

Allow pull requests from Github

Reported by: gh-tobiasdiez Owned by:
Priority: major Milestone: sage-wishlist
Component: misc Keywords:
Cc: embray, mkoeppe, robertwb, slelievre, was Merged in:
Authors: Reviewers:
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Status badges

Description (last modified by slelievre)

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 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.


Change History (11)

comment:1 Changed 21 months ago by DavidLowry

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.

comment:2 Changed 21 months ago by DavidLowry

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

comment:3 Changed 21 months ago by gh-tobiasdiez

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

comment:4 Changed 21 months ago by embray

We are accepting merge requests through GitLab:

The GitHub page should link to that.

Version 0, edited 21 months ago by embray (next)

comment:5 Changed 19 months ago by mkoeppe

  • Milestone changed from sage-9.2 to sage-9.3

comment:6 Changed 15 months ago by mkoeppe

  • Milestone changed from sage-9.3 to sage-9.4

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

comment:7 Changed 14 months ago by slelievre

  • Cc robertwb slelievre was added

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 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).

comment:9 Changed 14 months ago by slelievre

  • Description modified (diff)

comment:10 Changed 14 months ago by embray

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):

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

comment:11 Changed 14 months ago by embray

  • Milestone changed from sage-9.4 to sage-wishlist
Note: See TracTickets for help on using tickets.