Rename github-token input to githubToken

This commit is contained in:
Michal Dorner 2020-05-21 00:38:22 +02:00
parent f29479bb44
commit 350b8cb78b
4 changed files with 7 additions and 7 deletions

View File

@ -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:
@ -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/**/*'
@ -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

View File

@ -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:

2
dist/index.js vendored
View File

@ -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') {

View File

@ -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)