-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
GitHub App: open beta #12217
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
base: main
Are you sure you want to change the base?
GitHub App: open beta #12217
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks like a pretty small change to ship it 👍
- `Read the Docs Community <https://github.com/apps/read-the-docs-community/installations/new/>`__ | ||
- `Read the Docs Business <https://github.com/apps/read-the-docs-business/installations/new/>`__ | ||
|
||
Once you have installed the GitHub App, click on the :guilabel:`Projects` tab, and click on :guilabel:`Add project`, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This feels pretty clunky :/ I definitely know we're going to get support on this, and we should make sure we're including this information in the dashboard as well:
Don't see your project listed here? Make sure it's included in the <a>GitHub application</a>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's not really clear to me what we're trying to solve here, or at least what the aim is on UX.
Is the user expected to have to update their GHA permissions every time they create a project from a new repository?
If so, and this is going to be consistently the case, then we should probably have some better UI for GitHub App users specifically. Basically a more prominent or mandatory block than the "Can't find the repository" block at the bottom, and something explicit and closer to what Eric mentioned above.
If this isn't a standard case, the button at the botton is okay but I'd replace the "Referesh your repositories" button instead of having two buttons for GHA users. Having two buttons is going to result in users clicking both repeatedly trying to figure out which one and which order helps.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The buttons solve different issues, one suggest the user to install the app into the repository they want to install, this action needs to be done from GH, the other button resyncs our DB with the repositories the use has access to. When the GH app users shouldn't need to refresh, but it could still be needed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is the user expected to have to update their GHA permissions every time they create a project from a new repository?
This depends on how the user grants access to repositories to the app, if they select individual projects, then it's needed, if they marked "select all", then there is no need, as GH will install the app on every repository when created.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This depends on how the user grants access to repositories to the app,
But not future repositories, correct? We might be somewhere in the middle then, it's going to be common enough that users will get tripped up here but not common enough to make this mandatory, visually.
The buttons solve different issues
I get they have different functions, but my concern is probably more that GHA users shouldn't need to refresh repositories. They definitely shouldn't have to click refresh after clicking to update our GHA permissions. But I thought refresh would be less common with GHA as we have repository create/update events through the webhook now. It's okay if we're not there yet though.
Can follow up more in readthedocs/ext-theme#606 I don't think the docs will change with that PR.
- Go to the settings page of your GitHub repository, | ||
click on :guilabel:`Webhooks`, and delete all the webhooks with URLs that start with: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Go to the settings page of your GitHub repository, | |
click on :guilabel:`Webhooks`, and delete all the webhooks with URLs that start with: | |
- Click on :guilabel:`Webhooks`, and delete all the webhooks with URLs that start with: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The previous step was done in the RTD dashboard, this step needs to be done on GH, that's why I put "Go to the settings page of your GitHub repository".
if count > 0: | ||
messages.success(request, _(f"Successfully migrated {count} project(s).")) | ||
else: | ||
messages.info(request, _("No projects were migrated.")) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems like an error? We should definitely communicate a bit more about next steps if this happens.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I understand this is because the user didn't click on "Migrate" button for any of the projects. If that's the case, it seems it's not an error.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This only happens if the user clicks on "migrate all", and there are no projects to migrate (because the ones listed have warnings).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me as well.
- ``https://readthedocs.org/api/v2/webhook/<your-project-slug>`` or ``https://app.readthedocs.org/api/v2/webhook/<your-project-slug>`` for Read the Docs Community. | ||
- ``https://readthedocs.com/api/v2/webhook/<your-project-slug>`` or ``https://app.readthedocs.com/api/v2/webhook/<your-project-slug>`` for Read the Docs Business. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- ``https://readthedocs.org/api/v2/webhook/<your-project-slug>`` or ``https://app.readthedocs.org/api/v2/webhook/<your-project-slug>`` for Read the Docs Community. | |
- ``https://readthedocs.com/api/v2/webhook/<your-project-slug>`` or ``https://app.readthedocs.com/api/v2/webhook/<your-project-slug>`` for Read the Docs Business. | |
- ``https://readthedocs.org/`` or ``https://app.readthedocs.org/`` for Read the Docs Community. | |
- ``https://readthedocs.com/`` or ``https://app.readthedocs.com/`` for Read the Docs Business. |
I think we can probably trim this URL to make it easier to read.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In case a repository is connected to several RTD projects, the repository will have several webhooks (translations and subprojects are common to be linked to the same reposiotory)
body=_( | ||
textwrap.dedent( | ||
""" | ||
Migrate your projects from the <a href="{% url "migrate_to_github_app" %}">migration page</a>. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Migrate your projects from the <a href="{% url "migrate_to_github_app" %}">migration page</a>. | |
Migrate your projects automatically using the <a href="{% url "migrate_to_github_app" %}">migration page</a>. |
if count > 0: | ||
messages.success(request, _(f"Successfully migrated {count} project(s).")) | ||
else: | ||
messages.info(request, _("No projects were migrated.")) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I understand this is because the user didn't click on "Migrate" button for any of the projects. If that's the case, it seems it's not an error.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems good so far I think. I noted a number of instances of using "import" to describe project creation, I've been wanting to work towards no using that verb and just describing project creation and repository connection instead.
- `Read the Docs Community <https://github.com/apps/read-the-docs-community/installations/new/>`__ | ||
- `Read the Docs Business <https://github.com/apps/read-the-docs-business/installations/new/>`__ | ||
|
||
Once you have installed the GitHub App, click on the :guilabel:`Projects` tab, and click on :guilabel:`Add project`, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's not really clear to me what we're trying to solve here, or at least what the aim is on UX.
Is the user expected to have to update their GHA permissions every time they create a project from a new repository?
If so, and this is going to be consistently the case, then we should probably have some better UI for GitHub App users specifically. Basically a more prominent or mandatory block than the "Can't find the repository" block at the bottom, and something explicit and closer to what Eric mentioned above.
If this isn't a standard case, the button at the botton is okay but I'd replace the "Referesh your repositories" button instead of having two buttons for GHA users. Having two buttons is going to result in users clicking both repeatedly trying to figure out which one and which order helps.
Co-authored-by: Anthony <[email protected]>
Uh oh!
There was an error while loading. Please reload this page.