Skip to content

Commit

Permalink
Deprecate GITHUB_TOKEN input for token (#22)
Browse files Browse the repository at this point in the history
  • Loading branch information
fregante authored Jul 26, 2024
1 parent 8e0a8cf commit 44a1874
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 6 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/title-to-labels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ jobs:
- uses: ./
name: Local action (with defaults)
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
token: ${{ secrets.GITHUB_TOKEN }}
- uses: ./
name: Local action (with inputs)
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
token: ${{ secrets.GITHUB_TOKEN }}
keywords: question, q
labels: question, documentation
3 changes: 3 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ inputs:
description: The labels to apply when one of the keywords was found. Optional.
GITHUB_TOKEN:
description: 'The automatically-generated token, set this to \$\{\{ secrets.GITHUB_TOKEN \}\}'
deprecated: Use `token` instead
token:
description: 'The automatically-generated token, set this to \$\{\{ secrets.GITHUB_TOKEN \}\}'
runs:
using: node20
main: distribution/index.js
7 changes: 4 additions & 3 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ jobs:
steps:
- uses: fregante/title-to-labels-action@v1
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
token: ${{ secrets.GITHUB_TOKEN }}
```
You can automatically install the above with [ghat](https://github.com/fregante/ghat):
Expand Down Expand Up @@ -93,19 +93,20 @@ jobs:
steps:
- uses: fregante/title-to-labels-action@v1
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
token: ${{ secrets.GITHUB_TOKEN }}
keywords: idea
# If you don't specify `labels`, the action will just clean up the titles from your keywords.

# The action can be used as many times as needed in a single job
- uses: fregante/title-to-labels-action@v1
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
token: ${{ secrets.GITHUB_TOKEN }}
keywords: bug, bug report
labels: bug

- uses: fregante/title-to-labels-action@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
keywords: |
feature request
suggestions
Expand Down
2 changes: 1 addition & 1 deletion workflow/labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ jobs:
steps:
- uses: fregante/title-to-labels-action@v1
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
token: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit 44a1874

Please sign in to comment.