The Wayback Machine - http://web.archive.org/web/20260111063043/https://github.com/github/docs/pull/13564
Skip to content

Conversation

@floer32
Copy link

@floer32 floer32 commented Jan 1, 2022

ℹ️ It's a 1-line small change (though it could have some significance).

Why:

Opportunity for a small edit for the sake of keeping these API calls "Least Privilege."

I needed to create a new personal access token for another project using GitHub's (awesome) GraphQL API. I used the docs to remind me what scopes to give it and such. It occurred to me that the inclusion of repo alongside more granular permissions, without differentiation, might confuse or dissuade some people.

This commit may make more sense if you take a look at the Personal Access Token page on GitHub (where you create a new one), and open that alongside this small diff. Or you can view this screenshot for convenience —

Screenshot of Personal Access Token page

What's being changed:

Remove the repo line from the suggested permissions on this page in the documentation. I think it is consistent with the docs' intentions ..? It feels like it might have been a proofreading/formatting confusion, but I might just be confusing myself. (Happens often enough 😆 )

Check off the following:

  • I have reviewed my changes in staging (look for "Automatically generated comment" and click Modified to view your latest changes).
  • For content changes, I have completed the self-review checklist.

This commit may only make sense if you take a look at the Personal Access Token page on GitHub (where you create a new one), and open that alongside this small diff. 

----

I feel like I must be wrong / missing something, but I couldn't understand why "repo" was in this permissions list along with a subset of children under it. My best guess is that it was included on accident (or maybe some explanatory comment or text was lost, pointing out that it could be "repo" _or_ "public_repo,repo_deployment,repo:status" ...)

I'm pretty sure it's supposed to be this way (without the coarse permission of "repo"), and I'll test that shortly.
@welcome
Copy link

welcome bot commented Jan 1, 2022

Thanks for opening this pull request! A GitHub docs team member should be by to give feedback soon. In the meantime, please check out the contributing guidelines.

@github-actions
Copy link
Contributor

github-actions bot commented Jan 1, 2022

Automatically generated comment ℹ️

This comment is automatically generated and will be overwritten every time changes are committed to this branch.

The table contains an overview of files in the content directory that have been changed in this pull request. It's provided to make it easy to review your changes on the staging site. Please note that changes to the data directory will not show up in this table.


Content directory changes

You may find it useful to copy this table into the pull request summary. There you can edit it to share links to important articles or changes and to give a high-level overview of how the changes in your pull request support the overall goals of the pull request.

Source Staging Production What Changed
content/graphql/guides/forming-calls-with-graphql.md Modified Original

@github-actions github-actions bot temporarily deployed to docs-13564--patch-2 January 1, 2022 02:45 Inactive
@floer32
Copy link
Author

floer32 commented Jan 1, 2022

I'm using GraphiQL with a token that has these permissions — without the coarse repo permission. Seems to be workin' fine so far.

@ramyaparimi
Copy link
Contributor

@hangtwenty Please convert your PR from draft to ready for review when you are done with the changes 💖

@floer32 floer32 marked this pull request as ready for review January 5, 2022 23:14
@floer32
Copy link
Author

floer32 commented Jan 5, 2022

@ramyaparimi alrighty. I think it's ready.

@github-actions
Copy link
Contributor

A stale label has been added to this pull request because it has been open 7 days with no activity. To keep this PR open, add a comment or push a commit within 3 days.

@github-actions github-actions bot added the stale There is no recent activity on this issue or pull request label Jan 13, 2022
@floer32
Copy link
Author

floer32 commented Jan 14, 2022

Is there anything I need to do?

@ramyaparimi ramyaparimi added content This issue or pull request belongs to the Docs Content team waiting for review Issue/PR is waiting for a writer's review and removed stale There is no recent activity on this issue or pull request labels Jan 14, 2022
@ramyaparimi
Copy link
Contributor

@hangtwenty I apologize for the delay 💛 My notifications were wonky and I somehow missed this alert. I triaged your PR for a writers review. Thanks a bunch for your patience 💖

Thanks so much for taking your time to contribute to GitHub docs 💖

@ramyaparimi ramyaparimi added the graphql Content related to GraphQL label Jan 14, 2022
Copy link
Contributor

@skedwards88 skedwards88 left a comment

Choose a reason for hiding this comment

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

Thanks for this suggestion! We recommend these scopes to match the scopes granted to the GraphQL explorer. The explorer is not currently available for enterprise users, so for them we just display The following scopes are recommended: instead of To match the behavior of the GraphQL Explorer, request the following scopes:. I would recommend either changing the text that we display for enterprise users, or only removing the repo scope recommendation for enterprise users.

If you are new to the liquid versioning:
{% ifversion fpt or ghec %} precedes the text that only displays for free/pro/team or GHEC users. {% else %} precedes the text that displays for other users.

@skedwards88 skedwards88 removed the waiting for review Issue/PR is waiting for a writer's review label Feb 7, 2022
@github-actions
Copy link
Contributor

A stale label has been added to this pull request because it has been open 7 days with no activity. To keep this PR open, add a comment or push a commit within 3 days.

@github-actions github-actions bot added the stale There is no recent activity on this issue or pull request label Feb 15, 2022
Incorporated PR feedback
```

{% endif %}

Copy link
Author

Choose a reason for hiding this comment

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

@skedwards88 said:

Thanks for this suggestion! We recommend these scopes to match the scopes granted to the GraphQL explorer. The explorer is not currently available for enterprise users, so for them we just display The following scopes are recommended: instead of To match the behavior of the GraphQL Explorer, request the following scopes:. I would recommend either changing the text that we display for enterprise users, or only removing the repo scope recommendation for enterprise users.

If you are new to the liquid versioning: {% ifversion fpt or ghec %} precedes the text that only displays for free/pro/team or GHEC users. {% else %} precedes the text that displays for other users.

———

@skedwards88 thanks for the feedback and context! Is the updated diff what you had in mind?

@floer32 floer32 closed this Feb 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

content This issue or pull request belongs to the Docs Content team graphql Content related to GraphQL stale There is no recent activity on this issue or pull request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants