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

feat: default token to github.token #460

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,13 @@ jobs:
- uses: netlify/[email protected]
if: startsWith(github.event.pull_request.title, 'fix')
with:
token: '${{ secrets.GITHUB_TOKEN }}'
label: 'type: bug'
- uses: netlify/[email protected]
if: startsWith(github.event.pull_request.title, 'chore')
with:
token: '${{ secrets.GITHUB_TOKEN }}'
label: 'type: chore'
- uses: netlify/[email protected]
if: startsWith(github.event.pull_request.title, 'feat')
with:
token: '${{ secrets.GITHUB_TOKEN }}'
label: 'type: feature'
```
2 changes: 2 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@ description: 'A GitHub Action to label a Pull Request'
author: netlify
inputs:
token:
default: ${{ github.token }}
description: 'The GITHUB_TOKEN secret'
required: false
label:
description: 'The label to assign to the PR'
runs:
Expand Down
2 changes: 1 addition & 1 deletion dist/index.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import * as github from '@actions/github';

async function main() {
try {
const token = core.getInput('token', { required: true });
const token = core.getInput('token');
const label = core.getInput('label', { required: true });

const pullRequest = github.context.payload.pull_request;
Expand Down