Skip to content

"Add labels to an issue" doc refers to pull_requests:write permission, but should be pull-requests:write #32167

Closed

Description

@trentm

Code of Conduct

What article on docs.github.com is affected?

https://docs.github.com/en/rest/issues/labels?apiVersion=2022-11-28#add-labels-to-an-issue

What part(s) of the article would you like to see updated?

The doc says:

The token must have at least one of the following permission sets:

issues:write
pull_requests:write

but adding something like this to a GH action:

# ...
permissions:
  contents: read
  issues: write
  pull_requests: write

results in a syntax error, something like:

 Invalid workflow file

The workflow is not valid. .github/workflows/labeler.yml (Line: 12, Col: 3): Unexpected value 'pull_requests'

That permission name should be pull-requests -- with a hyphen.

Additional information

I believe (without having learned the build for this repo) a start at a fix is this change to github/docs.git:

diff --git a/src/rest/data/fpt-2022-11-28/schema.json b/src/rest/data/fpt-2022-11-28/schema.json
index d32e3d9912..1a8178247c 100644
--- a/src/rest/data/fpt-2022-11-28/schema.json
+++ b/src/rest/data/fpt-2022-11-28/schema.json
@@ -297935,7 +297935,7 @@
               "issues": "write"
             },
             {
-              "pull_requests": "write"
+              "pull-requests": "write"
             }
           ]
         },

I can open a PR for that, if that would be helpful. However:

  • there are a number of other "pull_requests": usages for permissions in that schema file
  • As well there are number of other schema files that I haven't looked at.

Activity

  1. added
    contentThis issue or pull request belongs to the Docs Content team
    on Mar 20, 2024
  2. welcome commented on Mar 20, 2024

    @welcome

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

  3. added
    triageDo not begin working on this issue until triaged by the team
    on Mar 20, 2024
  4. added
    restContent related to rest - overview.
    fix-internallyTriggers a workflow to copy the issue internally and close the current issue
    and removed
    triageDo not begin working on this issue until triaged by the team
    on Mar 20, 2024
  5. docs-bot commented on Mar 20, 2024

    @docs-bot
    Collaborator

    Thank you for opening this issue! Updates to this documentation must be made internally. I have copied your issue to an internal issue, so I will close this issue.

  6. nguyenalex836 commented on Mar 20, 2024

    @nguyenalex836
    Contributor

    @trentm Thank you for submitting this issue, and raising a flag on this! ✨ This portion of the documentation will need to be fixed internally. I've created an internal issue for our team to review, and will close out this issue 💛

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    contentThis issue or pull request belongs to the Docs Content teamfix-internallyTriggers a workflow to copy the issue internally and close the current issuerestContent related to rest - overview.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions