Skip to content
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

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

Open
bradynpoulsen opened this issue Feb 15, 2023 · 0 comments
Open

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

bradynpoulsen opened this issue Feb 15, 2023 · 0 comments

Comments

@bradynpoulsen
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants
@bradynpoulsen and others