Skip to content

GitHub App: link to app from import page #606

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

Merged
merged 3 commits into from
Jul 3, 2025
Merged

GitHub App: link to app from import page #606

merged 3 commits into from
Jul 3, 2025

Conversation

stsewd
Copy link
Member

@stsewd stsewd commented May 29, 2025

The code template tag and setting will be added in readthedocs/readthedocs.org#12217 once we agree if we are okay with this change.

Screenshot 2025-05-29 at 16-08-41 Add project - Read the Docs Dev
Screenshot 2025-05-29 at 16-08-35 Add project - Read the Docs Dev

@stsewd stsewd requested a review from a team as a code owner May 29, 2025 21:09
@stsewd stsewd requested a review from agjohnson May 29, 2025 21:09
Copy link
Member

@humitos humitos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm in doubt about this. The button is specific for GitHub while we do support other providers here as well. Is this a temporary workaround while we are in the transition?

What would be the next steps after the transition? Will we remove the "Refresh repositories"? Will we keep both buttons?

href="https://github.com/apps/{{ GITHUB_APP_NAME }}/installations/new/"
target="_blank">
<i class="fa-brands fa-github icon"></i>
{% trans "Install GitHub App" %}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
{% trans "Install GitHub App" %}
{% trans "Install GitHub App (beta)" %}

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should be consistent with how we are describing this, we don't really describe this as a beta anywhere else except maybe the migration page that blocks the last few steps.

I'm find labeling it as beta, but we should do it everywhere.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Regarding content, this doesn't communicate that this step might be required every single project creation. If I had already connected/installed the GHA, I would assume I didn't need to click this button ever again.

It should specifically call out that the user needs to update the GHA permissions.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is the only real thing stopping this PR from going out. We can make more improvements in a following UI.

Suggested change
{% trans "Install GitHub App" %}
{% trans "Update GitHub App permissions" %}

@stsewd
Copy link
Member Author

stsewd commented Jun 2, 2025

The GH option is only displayed for users that are using the GH app.

@agjohnson
Copy link
Contributor

Will we remove the "Refresh repositories"? Will we keep both buttons?

This is my question as well. I think it's confusing to have two buttons to solve a potential single issue and we should only have a single button.

Also, pointed out in the other PR, our UI should depend on how often the user might hit this. If users will need to update the permissions every project creation, we should make the UI for updating permissions a bit more obvious.

@humitos
Copy link
Member

humitos commented Jun 3, 2025

If users will need to update the permissions every project creation, we should make the UI for updating permissions a bit more obvious.

I understand the user will need to install the GHA on every project creation if they haven't selected the option to install GHA in all the projects at once and instead selected specific projects.

One doubt that I have is: will those projects that where our GHA is not installed appear on the listing? If not, that's a problem... Can we list all the projects there (even those where our GHA is not installed) and make the installation of the GHA part of the "Add project" workflow?

@agjohnson
Copy link
Contributor

agjohnson commented Jun 3, 2025

I think I'm picturing similar issues with UX there. It seems like we'll need the GHA permission step to be more mandatory.

For current users, we'll guide them through adding permissions to repositories during migration. But going forward, each new repository and every new user using GHA will probably have to more frequently update the GHA permissions.

I'm still using OAuth on CircleCI, how do they handle this UX with GHA?

@humitos
Copy link
Member

humitos commented Jun 17, 2025

It seems like we'll need the GHA permission step to be more mandatory.

Yeah. I see the same here.

The workflow to "Add a project" will be different for users using GHA (without granting access to all repositories) because they will first need to grant our GHA access to the repository and then select the repository from the list. Unfortunately, we have no way to list the repository first because as we don't have access to that repository, we don't even know it exists 😞

This first step (granting access to the RTD GHA using the external GitHub page) is what I'm saying it has to be more integrated into the the "Add project" workflow. That said, I'm fine if this integration is not perfect yet and it's just some copy with a link to the external GitHub page; but we need to communicate that required first step clearly.

Note that we were already confused about this and we are the ones creating this feature. So, I would expect users to be pretty confused here as well 😄 . We need to guide them.

@ericholscher
Copy link
Member

What is the status here? Are we moving forward with this with the GH App deploy?

@humitos
Copy link
Member

humitos commented Jun 25, 2025

This wasn't ready for yesterday's deploy.

We need to figure it out how to implement the workflow mentioned in my previous comment: #606 (comment)

@agjohnson
Copy link
Contributor

We could decide if we want to continue with this PR, but I was thinking about jumping into adding some more major UI here next. I agree so far that the button at the bottom probably won't be enough for some cases.

It feels like we'll need some UI before the user can search:

  • If the GHA is installed across all repositories, we don't need to do anything special.
  • If the GHA is installed on specific repositories, we should instruct the user to update their GHA configuration
  • If the GHA is installed on specific repositories but the user can't update the GHA configuration, we should instruct the user to find someone that can update the settings?

Can we detect any of the above scenarios or do we need to guess at all these?

@agjohnson
Copy link
Contributor

@stsewd You know the most here, can we detect any of the above scenarios?

@stsewd
Copy link
Member Author

stsewd commented Jul 2, 2025

If the GHA is installed across all repositories, we don't need to do anything special.

We can know this, but we are not saving this information in the model.

If the GHA is installed on specific repositories, we should instruct the user to update their GHA configuration
If the GHA is installed on specific repositories but the user can't update the GHA configuration, we should instruct the user to find someone that can update the settings?

Don't think we can know this directly, but GH will prompt the user to "request" approval to grant access to additional projects.

@agjohnson
Copy link
Contributor

We can know this, but we are not saving this information in the model.

That might be a great addition for later. We'll need to see exactly what we give users for an intermediate UI first, and then if it makes more sense to improve the repository selection UI

href="https://github.com/apps/{{ GITHUB_APP_NAME }}/installations/new/"
target="_blank">
<i class="fa-brands fa-github icon"></i>
{% trans "Install GitHub App" %}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is the only real thing stopping this PR from going out. We can make more improvements in a following UI.

Suggested change
{% trans "Install GitHub App" %}
{% trans "Update GitHub App permissions" %}

@stsewd stsewd merged commit 2dbdac7 into main Jul 3, 2025
4 checks passed
@stsewd stsewd deleted the link-to-gh-app branch July 3, 2025 19:15
@github-project-automation github-project-automation bot moved this from Planned to Done in 📍Roadmap Jul 3, 2025
stsewd added a commit that referenced this pull request Jul 8, 2025
agjohnson pushed a commit that referenced this pull request Jul 8, 2025
Reverts #606

user_has_github_app_account wasn't implemented in .org, reverting until
it's implemented.
stsewd added a commit that referenced this pull request Jul 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

4 participants