[docs] Support GitHub fine-grained access tokens with limitations#50274
Conversation
| | ----------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | | ||
| | [Sync private repositories](#private-repositories) | `repo` | | ||
| | [Sync repository permissions][permissions] | `repo` | | ||
| | [Repository permissions caching][permissions-caching] | `repo`, `write:org` | |
There was a problem hiding this comment.
I'm removing this line because it is not applicable to Personal Access Tokens. It only applies to OAuth tokens, as that's where this setting is used.
|
Codenotify: Notifying subscribers in CODENOTIFY files for diff 3289d1d...1277a21.
|
| The `repositoryQuery` option `"public"` is valuable in that it allows sourcegraph to sync all public repositories, however, it does not return whether or not a repo is archived. This can result in archived repos appearing in normal search. You can see an example of what is returned by the GitHub API for a query to "public" [here](https://docs.github.com/en/rest/reference/repos#list-public-repositories). | ||
|
|
||
| If you would like to sync all public repositories while omitting archived repos, consider generating a GitHub token with access to only public repositories, then use `respositoryQuery` with option `affiliated` and an `exclude` argument with option `public` as seen in the example below: | ||
| If you would like to sync all public repositories while omitting archived repos, consider generating a GitHub token with access to only public repositories, then use `repositoryQuery` with option `affiliated` and an `exclude` argument with option `public` as seen in the example below: |
kopancek
left a comment
There was a problem hiding this comment.
Looks good, added 1 suggestion to change or to and, sounds better to me that way, since both are not supported.
vdavid
left a comment
There was a problem hiding this comment.
Looks good; if you want to invest a bit more time in this, I think a short guide to answer the question "Which one shall I use, a Personal or a fine-grained access token? What are the pros and cons for each?" would help customers big time. Part of the answer is in there already, but I suggest extracting and completing it.
Add docs to explain what is supported by fine-grained access tokens.
Test plan
I verified that repository and permissions syncing does work, and that
repositoryQueryand Batch Changes does not work.