WordPress.org

Making WordPress.org

Opened 5 weeks ago

Last modified 11 days ago

#4903 new enhancement

Show Github PRs on Trac

Reported by: dd32 Owned by:
Milestone: Priority: normal
Component: Trac Keywords:
Cc:

Description (last modified by dd32)

With Github PRs being used more often now, there's been an attempt by a few people to expose Github PRs within Trac, this ticket is being used for tracking that effort.

Initially this is going to be enabled for Core trac only, and for the WordPress/WordPress-develop Github repo only, but has the potential to have multiple repo's and multiple tracs in the future if needed.

Initial development of this was worked on by @andraganescu @desrosj @isabel_brison @noisysocks @pento @talldanwp

The commits that follow this have however been rewritten heavily by myself to make it performant and fit the WordPress.org style.


Task List: ( ✅Completed, ❌Not yet, ❓Pending Question)
✅Track PRs on Github, and show them on Trac Tickets
✅Add a mention to Tickets comments when a PR is opened.
❌Always load PRs, for authenticated and unauthenticated (Currently it only auto-loads for authenticated requests)
✅Sync PR Comments to Trac
❌Sync PR Comment edits to Trac
❌Sync PR Code Review comments to Trac
❌Sync PR Code Review comment edits to Trac
❓Should all Github PR comments trigger Trac Emails? (Note: Edits won't be able to, and responses to existing code review instances would be best done as edits too)
❓Should Github PR activity be piped to Trac Firehose channels to compensate for lack of edit emails?

Change History (15)

#1 @dd32
5 weeks ago

In 9340:

Trac: Add initial code to show Github PRs on Trac tickets.

Props dd32, andraganescu, desrosj, isabel_brison, noisysocks, pento, talldanwp.
See #4903.

#2 @dd32
5 weeks ago

In 9341:

Trac: Bump scripts version.

See #4903.

#3 @dd32
5 weeks ago

The Core Trac caches are slowly clearing.. #core43805 is an example of a ticket with a single PR, and #core48502 for 3 PRs.

#4 @Mte90
5 weeks ago

Hi sorry for the questions, but I have few of them because this is implementation is revolutionary:

  • When the handbook will be updated? In this way we can suggest an alternative and more easy way instead of doing patches also at contributors day
  • This pr will be tracked inside Trac in the My Patches? I think that this require https://meta.trac.wordpress.org/ticket/4447 enabled for everyone
  • I think that also few guidelines about how to do the pr in the handbook will be very helpful, I think that for the next patch I will do I will switch to GitHub.

#5 @dd32
5 weeks ago

Hi @Mte90 and thanks for asking

When the handbook will be updated? In this way we can suggest an alternative and more easy way instead of doing patches also at contributors day

It's up to the Core team as to when that happens, there's a few more things in the works that a few believe is needed before full recommendation of it.

This pr will be tracked inside Trac in the My Patches?

At this point, there's no plans for that. Unfortunately integrating with https://core.trac.wordpress.org/my-patches would require some significant changes to how the Trac query happens.
There's the option that we could potentially just include an extra list below the table of any open PRs, but that's not high on my list of priorities for now.

There's a more-or-less hidden (just unannounced) feature in profiles - you can link your Github account with your WordPress.org account which helps #4447 greatly.

I think that also few guidelines about how to do the pr in the handbook will be very helpful

Once again, that's up to the Core team to update their handbooks - AFAIK there's no real current guidelines, but I expect that would happen pretty quickly if PR quality becomes an issue.

#6 @dd32
5 weeks ago

In 9365:

Trac: Github PRs: Properly craft the Github API request when a POST request is used, and ensure that we set the headers correctly.

See #4903.

#7 @dd32
5 weeks ago

In 9366:

Trac: Github PRs: When a PR is first detected referencing a ticket, add an inline mention to Trac.

For now, this doesn't trigger email notifications.

See #4903.

#8 @dd32
5 weeks ago

In 9367:

Trac: Github PRs: style prbot comments similar to slackbot mentions when the comment is italic (which signifies it's an inline comment, rather than a regular comment).

See #4903.

#9 @dd32
5 weeks ago

See also [9356] which still hasn't actually been deployed

Trac: Increase the padding of the 'chat-bot' comments (slackbot, etc) by 1px to hide the underline from the parent element.
This also hides the comment action buttons since they're not useful here.

#10 @dd32
5 weeks ago

In 9368:

Trac: Bump scripts version again to deploy r9356.

See #4903.

#11 @dd32
4 weeks ago

In 9370:

Trac: Github PRs: Add a wrapper to call the trac wpapi endpoints.

See #4903.

#12 @dd32
4 weeks ago

In 9371:

Trac: Github PRs: Fix a typo preventing finding the WordPress.org user.

See #4903.

#13 @dd32
4 weeks ago

In 9372:

Trac: Github PRs: Add a wrapper for the Trac class for easier testing.

See #4903.

#14 @dd32
4 weeks ago

  • Description modified (diff)
  • Type changed from defect to enhancement

Adding a basic task list to the ticket description to track current and future parts of this ticket that's needed.

This ticket was mentioned in Slack in #core by sergey. View the logs.


11 days ago

Note: See TracTickets for help on using tickets.