create-pull-request icon indicating copy to clipboard operation
create-pull-request copied to clipboard

Incorrect casing for "github-token" example in the readme

Open D4nte opened this issue 5 years ago • 5 comments

It looks like github action expects kebab casing:

I get the following warning when using this action in: https://github.com/D4nte/comit-rs/actions/runs/340812607

Check warning on line 1 in .github

@github-actions github-actions / Draft a new release of cnd

.github#L1

Unexpected input(s) 'GITHUB_TOKEN', valid inputs are ['github-token', 'head', 'title', 'base', 'draft', 'body', 'reviewers']

D4nte avatar Nov 02 '20 01:11 D4nte

Yes, looking at the current code, I think this just needs to be removed and we need to document that we expect the GITHUB_TOKEN env variable.

thomaseizinger avatar Nov 02 '20 02:11 thomaseizinger

Any update on this? having issues getting this to work. What is the right way to call this? I'm looking at this example, but it seems out of date https://gist.github.com/riggaroo/d828c5ffecf261d3ccc7bde89817dba5

teebu avatar May 19 '21 03:05 teebu

name: "Create PR"
on: push

jobs:
  create-pr-on-push:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/[email protected]
    
    - name: Create pull request
      uses: thomaseizinger/create-pull-request@master
	  env:
        GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
      with:
        head: ${{ github.ref }}
        base: master
        title: "An automatically created PR!"

Should do it but then I also think this is actually implicit and you don't need to specify anything in regards to GITHUB_TOKEN unless you want to set a personal access token.

thomaseizinger avatar May 19 '21 06:05 thomaseizinger

The 1.0.0 version requires it in the action.yaml? https://github.com/thomaseizinger/create-pull-request/blob/master/action.yml#L10

Thanks, I think it's working.

teebu avatar May 20 '21 03:05 teebu

Yep, but that seems to be an error. We don't ever actually read such an input: https://github.com/thomaseizinger/create-pull-request/blob/master/src/getInputs.ts

thomaseizinger avatar May 20 '21 06:05 thomaseizinger