Skip to content

Commit

Permalink
Rename github-token input to githubToken
Browse files Browse the repository at this point in the history
  • Loading branch information
Michal Dorner committed May 20, 2020
1 parent f29479b commit 350b8cb
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ Corresponding output variable will be created to indicate if there's a changed f
Output variables can be later used in the `if` clause to conditionally run specific steps.

### Inputs
- **`repo-token`**: GitHub Access Token - use `${{ github.token }}`
- **`filters`**: YAML dictionary where keys specifies rule names and values are lists of path patterns
- **`githubToken`**: GitHub Access Token - use `${{ github.token }}`
- **`filters`**: YAML dictionary where keys specifies rule names and values are lists of file path patterns

### Outputs
- For each rule it sets output variable named by the rule to text:
Expand Down Expand Up @@ -51,7 +51,7 @@ jobs:
- uses: dorny/pr-changed-files-filter@v1
id: filter
with:
github-token: ${{ github.token }}
githubToken: ${{ github.token }}
filters: |
backend:
- 'backend/**/*'
Expand All @@ -76,7 +76,7 @@ jobs:
## How it works
1. Required inputs are checked (`github-token` & `filters`)
1. Required inputs are checked (`githubToken` & `filters`)
2. Provided access token is used to fetch list of changed files.
3. For each filter rule it checks if there is any matching file
4. Output variables are set
Expand Down
2 changes: 1 addition & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: 'Pull request changed files filter'
description: 'Enables conditional execution of workflow job steps considering which files are modified by a pull request.'
author: 'Michal Dorner <dorner.michal@gmail.com>'
inputs:
github-token:
githubToken:
description: 'GitHub Access Token - use ${{ github.token }}'
required: true
filters:
Expand Down
2 changes: 1 addition & 1 deletion dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4117,7 +4117,7 @@ const filter_1 = __importDefault(__webpack_require__(235));
function run() {
return __awaiter(this, void 0, void 0, function* () {
try {
const token = core.getInput('github-token', { required: true });
const token = core.getInput('githubToken', { required: true });
const filterYaml = core.getInput('filter', { required: true });
const client = new github.GitHub(token);
if (github.context.eventName !== 'pull_request') {
Expand Down
2 changes: 1 addition & 1 deletion src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import Filter from './filter'

async function run(): Promise<void> {
try {
const token = core.getInput('github-token', {required: true})
const token = core.getInput('githubToken', {required: true})
const filterYaml = core.getInput('filter', {required: true})
const client = new github.GitHub(token)

Expand Down

0 comments on commit 350b8cb

Please sign in to comment.