Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Handle repositories input with spaces between repositories #106

@niodice

Description

@niodice

This action could handle a little more flexibility in the repositories input. A common mistake is to provide repositories: foo, bar instead of repositories: foo,bar if a token is needed for > 1 repository.

For example:

    - name: Generate Github Actions App token
      id: generate-token
      uses: actions/create-github-app-token@v1
      with:
        app-id: ${{ env.GH_APP_APP_ID }}
        private-key: ${{ env.GH_APP_PRIVATE_KEY }}
        repositories: foo, bar

Fails to get a token because the body in the HTTP request to GH will look like this:

body: '{"repositories":["foo"," bar"]}',

I think trimming the repos, something like repos = repos.map(r => r.trim()), would catch this and make for a more intuitive API

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions