Ability to pass permissions as comma separated list

Open
#322 1 comment 4 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
64/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Quiet
Tech stack
github-actions, javascript
Domain
ci-cd, devops

Research direction

Start at the action's input handling and trace how individual permission-{permission_name} inputs are currently processed. Check the existing permission-related behavior and tests, then verify that a comma-separated permissions input works in the composite-action example while preserving existing single-permission usage.

Written by the indexing model from the issue text.

Description

The permission-{permission_name} has to be passed one by one to the action.
This makes it impossible to wrap this action with some other logic into a composite action, that can be distributed. For example, when the credentials of a github app are not taken from a github secret but from a different secret store.

If we pass permissions as a comma separated list we can have something like the following:

outputs:
    token: ${{ steps.generate-token.outputs.token }}

... other steps go here...

    - name: Generate a token
      id: generate-token
      uses: actions/create-github-app-token@v2
      with:
        app-id: ${{ steps.get-app-credentials.outputs.APP_ID_KEY }}
        private-key: ${{ steps.get-app-credentials.outputs.PRIVATE_KEY }}
        owner: ${{ inputs.repository_owner }}
        repositories: ${{ inputs.repositories }}
        permissions: ${{ inputs.permissions }}
Dominant language
JavaScript
Stars
886
Forks
174
PR merge metrics
No merged PRs in 30d

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from actions/create-github-app-token

All issues in actions/create-github-app-token

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.