Skip to content

Add docs about setting up permissions for GH apps & orgs #8305

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 7 commits into from
Jul 6, 2021
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 33 additions & 2 deletions docs/connected-accounts.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,7 @@ Connecting your account allows for:
If you signed up or logged in to Read the Docs with your GitHub, Bitbucket, or GitLab
credentials, you're all done. Your account is connected.

To connect your unconnected account, go to your *Settings* dashboard
and select `Connected Services <https://readthedocs.org/accounts/social/connections/>`_.
To connect a social account, go to your :guilabel:`Username dropdown` > :guilabel:`Settings` > :guilabel:`Connected Services`.
Copy link
Member

Choose a reason for hiding this comment

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

I think we should still mention the link, something like "go to this link or ...". It is easier to just click than search for the UI elements.

Copy link
Member Author

Choose a reason for hiding this comment

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

We need a way to link to both sites, if we're providing a link..

From here, you'll be able to connect to your GitHub, Bitbucket or GitLab
account. This process will ask you to authorize a connection to Read the Docs,
that allows us to read information about and clone your repositories.
Expand Down Expand Up @@ -66,6 +65,38 @@ Repository status (``repo:status``)
but there isn't a more granular permission
that only allows setting up SSH keys for read access.

.. _github-permission-troubleshooting:
Copy link
Member

Choose a reason for hiding this comment

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

We are using autolabel, there is no need for this, at least I'm missing something?

Copy link
Member Author

Choose a reason for hiding this comment

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

I think I added this prior to adding the section label.


GitHub permission troubleshooting
`````````````````````````````````

**Repositories not in your list to import**.

Many organizations require approval for each OAuth application that is used,
or you might have disabled it in the past for your personal account.
This can happen at the personal or organization level,
depending on where the project you are trying to access has permissions from.
Copy link
Contributor

Choose a reason for hiding this comment

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

It might be helpful to discuss the outcome to the user here as well. The question I always field is "why are my repositories not in my list of repositories I can import" or "why is my organization missing from the import page". I'd like to link to this section in the dashboard UI later, so hopefully can help direct users at the source.

Copy link
Member Author

Choose a reason for hiding this comment

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

Aye -- I don't know the best way to structure it, so I just put it in bold for now.


.. tabs::

.. tab:: Personal Account

You need to make sure that you have granted access to the Read the Docs `OAuth App`_ to your **personal GitHub account**.
If you do not see Read the Docs in the `OAuth App`_ settings, you might need to disconnect and reconnect the GitHub service.

.. seealso:: GitHub docs on `requesting access to your personal OAuth`_ for step-by-step instructions.

.. _OAuth App: https://github.com/settings/applications
.. _requesting access to your personal OAuth: https://docs.github.com/en/organizations/restricting-access-to-your-organizations-data/approving-oauth-apps-for-your-organization

.. tab:: Organization Account

You need to make sure that you have granted access to the Read the Docs OAuth App to your **organization GitHub account**.
If you don't see |com_brand| listed, then you might need to connect GitHub in your social accounts as noted above.

.. seealso:: GitHub doc on `requesting access to your organization OAuth`_ for step-by-step instructions.

.. _requesting access to your organization OAuth: https://docs.github.com/en/github/setting-up-and-managing-your-github-user-account/managing-your-membership-in-organizations/requesting-organization-approval-for-oauth-apps

Bitbucket
~~~~~~~~~
Expand Down
8 changes: 3 additions & 5 deletions docs/pull-requests.rst
Original file line number Diff line number Diff line change
Expand Up @@ -59,17 +59,15 @@ Troubleshooting
#. **Pull Requests builds are not triggered**.
We only support GitHub and GitLab currently.
You need to make sure that your Read the Docs account is connected with that provider.
You can check this by going to your `profile settings`_.
You can check this by going to your :guilabel:`Username dropdown > Settings > Connected Services`.

#. **Build status is not being reported to your VCS provider**.
You need to make sure that you have granted access to the Read the Docs
`OAuth App`_ to your personal or organization GitHub account.
If you do not see "Read the Docs" in the `OAuth App`_ settings,
you might need to disconnect and reconnect to GitHub service.
OAuth App to your personal or organization GitHub account.
Learn more about this in our :ref:`github-permission-troubleshooting` section.

Also make sure your webhook is properly setup
to handle events related to pull requests. You can setup or ``re-sync`` the webhook from your projects admin dashboard.
Learn more about setting up webhooks from our :doc:`Webhook Documentation </webhooks>`.

.. _profile settings: https://readthedocs.org/accounts/social/connections/
.. _OAuth App: https://github.com/settings/applications