Skip to content

Feature: Specify subset of permissions to grant to the token #65

Description

@bradynpoulsen

Overview

Inspired by tibdex/github-app-token, I propose that a permissions input is added to be able to configure a desired subset of permissions that should be issued to the token.

Example Usage

- uses: getsentry/action-github-app-token@v2
  with:
    app_id: ${{ secrets.APP_ID }}
    private_key: ${{ secrets.APP_PRIVATE_KEY }}
    permissions: |
      {"contents": "read"}

Implementation

Per octokit/auth-app.js, it appears that a permissions argument can be specified to the appOctokit.auth call. I believe having a permissions input that is a JSON map of desired permissions would be the easiest adoption of this function.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions