WordPress.org

Making WordPress.org

Opened 3 months ago

Closed 3 months ago

#5379 closed defect (fixed)

GitHub buttons aren't working over WP-CLI

Reported by: felipeloureirosantos Owned by: coffee2code
Milestone: Priority: low
Component: Developer Hub Keywords: needs-patch
Cc:

Description

Steps for reproducing the issue:

  1. Access one of the WP-CLI commands pages on DevHub (such as https://developer.wordpress.org/cli/commands/admin/)
  2. Press one of the GitHub buttons (such as "View Open Issues", "View Closed Issues", or "Create New Issue")
  3. It should send you to a GitHub 404 page, and you would be able to reproduce the issue

Change History (6)

#1 @felipeloureirosantos
3 months ago

  • Priority changed from normal to low

#2 @dd32
3 months ago

Looks like you have to be signed into GitHub for those URLs to work.

Due to the way WP-CLI repo's are setup, I don't think it's possible to link to issues any other way, as it needs to do a organisation search rather than a repo view.

#3 follow-up: @felipeloureirosantos
3 months ago

Got it. Yep, it worked when logged in.

I was checking, and we maybe can add https://github.com/login?return_to= with the GitHub path for making login required. At least it wouldn't bring us to a 404 page. Not sure if that would make sense for you as well.

Also, wouldn't the default opened/closed views work as expected as well? It wouldn't require the user to be logged in.

Can't we add the following links instead?

View Open Issues: https://github.com/wp-cli/admin-command/issues?q=is%3Aopen+is%3Aissue
View Closed Issues: https://github.com/wp-cli/admin-command/issues?q=is%3Aissue+is%3Aclosed
Create New Issue: https://github.com/login?return_to=%2Fwp-cli%2Fadmin-command%2Fissues%2Fnew

#4 in reply to: ↑ 3 @dd32
3 months ago

Replying to felipeloureirosantos:

I was checking, and we maybe can add https://github.com/login?return_to= with the GitHub path for making login required. At least it wouldn't bring us to a 404 page. Not sure if that would make sense for you as well.

I went looking for a redirect_to, but didn't directly test it's existence, I'd be happy to support it being a logged in link like that, it'll signify that they need to login which as you say, is better than a 404.

Can't we add the following links instead?

AFAIK, it's possible for issues to be reported in different repo's of the org, but apply to multiple commands (repos), which is why it's the current setup. I'd love if the CLI team disagree with me :)

#6 @coffee2code
3 months ago

  • Owner set to coffee2code
  • Resolution set to fixed
  • Status changed from new to closed

In 10185:

Developer, CLI Handbook: Change the view open/closed GitHub ticket URLs to pass through GH's login page.

These links are to queries that require the GH user to be logged in and 404 if they aren't. This approach at least makes it clear that they need to log in and will redirect them to desired page once they do so.

Props felipeloureirosantos, dd32.
Fixes #5379.

Note: See TracTickets for help on using tickets.