[wp-meta] [Making WordPress.org] #4903: Show Github PRs on Trac

Making WordPress.org noreply at wordpress.org
Tue Feb 25 00:00:20 UTC 2020

#4903: Show Github PRs on Trac
 Reporter:  dd32         |       Owner:  (none)
     Type:  enhancement  |      Status:  new
 Priority:  normal       |   Milestone:
Component:  Trac         |  Resolution:
 Keywords:               |

Comment (by dd32):

 Replying to [comment:25 ocean90]:
 > I think the display of `mergeable_state` needs some improvement. When a
 build is still running the value is `unstable` which is incorrectly
 displayed as "❌ Failing tests". When tests are actually failing
 ([https://github.com/WordPress/wordpress-develop/pull/156 example]) the
 state is `unknown` and displayed as "undefined".

 Agreed, The logic is in the
 /wp-trac.js#L1623 prStatus()] function in the JS, if someone could
 properly list out the actual statuses that we need to take into account. I
 just copied what the previous implementation had used, which evidently
 doesn't cover all bases.

 > It seems like https://developer.github.com/v3/repos/statuses/#get-the-
 combined-status-for-a-specific-ref will give us the correct results for

 PR's don't link to that endpoint directly, but crafting the URL for it
 seems to work.
 The only "issue" I see is that the output only ever mentions AppVeyor, not
 Travis.. I'm unsure if that's just because it's the slower of the two, but
 the Github docs seem to suggest it should include both? (It's github.. it
 probably works)
 eg. [https://api.github.com/repos/WordPress/wordpress-develop/pulls/166
 pulls/166] links to [https://api.github.com/repos/WordPress/wordpress-
 develop/statuses/504f8f8165c3e899e2a7fd20a3740d770b5b9550 /statuses/{SHA}]
 which can be altered to a [https://api.github.com/repos/WordPress
 {SHA}/status] request.

Ticket URL: <https://meta.trac.wordpress.org/ticket/4903#comment:27>
Making WordPress.org <https://meta.trac.wordpress.org/>
Making WordPress.org

More information about the wp-meta mailing list