Skip to content

Commit

Permalink
Ch13129/exemption users fix (#5)
Browse files Browse the repository at this point in the history
  • Loading branch information
Austin Paquette authored Jun 20, 2020
1 parent 32f7b26 commit bc01e8b
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 3 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## 1.2.1 (June 20, 2020)

Fix a configuration bug marking the new `exemptUsers` field as true creating a breaking change. This is now an optional field as intended.

## 1.2.0 (June 17, 2020)

Provide a configuration option to exempt users from the action rules. Most useful for automated and bot PRs.
Expand Down
2 changes: 1 addition & 1 deletion build/index.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "ticket-check-action",
"description": "Verify that your pull request titles start with a ticket ID",
"version": "1.2.0",
"version": "1.2.1",
"author": "Neo Financial Engineering <[email protected]>",
"license": "MIT",
"repository": {
Expand Down
3 changes: 2 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,15 @@ async function run(): Promise<void> {
const { sender } = context.payload;

// Exempt Users
const exemptUsers = getInput('exemptUsers', { required: true })
const exemptUsers = getInput('exemptUsers', { required: false })
.split(',')
.map(user => user.trim());

if (sender && exemptUsers.includes(sender.login)) {
debug('User is listed as exempt');
debug(`Exempt Users: ${exemptUsers.join(', ')}`);
debug(`Pull Request Owner: ${sender.login}`);

return;
}

Expand Down

0 comments on commit bc01e8b

Please sign in to comment.