Skip to content

Commit 7ae13f6

Browse files
committed
Fix Token
1 parent 1f8ded8 commit 7ae13f6

3 files changed

Lines changed: 9 additions & 3 deletions

File tree

README.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,15 @@ This action lints CODEOWNERS file.
88

99
The path to the directory it should run.
1010

11+
### `token`
12+
13+
The token to be used.
14+
1115
## Example usage
1216

1317
```
14-
uses: fmenezes/codeownerslint-action@v1
18+
uses: fmenezes/codeowners-action@v2
1519
with:
1620
dir: './path/to/code/'
21+
token: ${{ secrets.MY_TOKEN }}
1722
```

action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ inputs:
77
default: '.'
88
token:
99
description: 'Github token to use'
10-
required: false
10+
required: true
1111
runs:
1212
using: 'docker'
1313
image: 'Dockerfile'

entrypoint.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,6 @@
22

33
DIR=$1
44
TOKEN=${2:-$GITHUB_TOKEN}
5+
FORMAT='::{{.Severity.Name}} file={{.Position.FilePath}},line={{.Position.StartLine}},col={{.Position.StartColumn}}::{{.Message}}'
56

6-
codeownerslint -f '::{{.Severity.Name()}} file={{.Position.FilePath}},line={{.Position.StartLine}},col={{.Position.StartColumn}}::{{.Message}}' -d $DIR -t $TOKEN
7+
codeownerslint -f $FORMAT -d $DIR -t $TOKEN

0 commit comments

Comments
 (0)