Skip to content

Commit

Permalink
feat: user assignement check
Browse files Browse the repository at this point in the history
  • Loading branch information
pozil committed Jan 2, 2025
1 parent 1dc8e16 commit a739fb4
Show file tree
Hide file tree
Showing 23 changed files with 371 additions and 241 deletions.
23 changes: 12 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,18 @@

## Inputs

| Parameter | Type | Required | Default | Description |
| --------------------------- | ------- | ------------------------------------ | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `assignees` | String | only if `teams` is not specified | n/a | Comma separated list of user names with optional [weights](#working-with-weighted-assignements). Issue will be assigned to those users. |
| `teams` | String | only if `assignees` is not specified | n/a | Comma separated list of team names without the org prefix with optional [weights](#working-with-weighted-assignements). Issue will be assigned to the team members.<br/><br/>**Important Requirement:** if using the `teams` input parameter, you need to use a personal access token with `read:org` scope (the default `GITHUB_TOKEN` is not enough). |
| `numOfAssignee` | Number | false | n/a | Number of assignees that will be randomly picked from the teams or assignees. If not specified, assigns all users. |
| `abortIfPreviousAssignees` | Boolean | false | false | Flag that aborts the action if there were assignees previously. |
| `removePreviousAssignees` | Boolean | false | false | Flag that removes assignees before assigning them (useful the issue is reasigned). |
| `allowNoAssignees` | Boolean | false | false | Flag that prevents the action from failing when there are no assignees. |
| `allowSelfAssign` | Boolean | false | true | Flag that allows self-assignment to the issue author.<br/><br/>This flag is ignored when working with PRs as self assigning a PR for review is forbidden by GitHub. |
| `issueNumber` | Number | false | n/a | Allows to override the issue number. This can be useful when context is missing. |
| `teamIsPullRequestReviewer` | Boolean | false | false | Sets team as the PR reviewer instead of a member of the team. |
| Parameter | Type | Required | Default | Description |
| ------------------------------ | ------- | ------------------------------------ | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `assignees` | String | only if `teams` is not specified | n/a | Comma separated list of user names with optional [weights](#working-with-weighted-assignements). Issue will be assigned to those users. |
| `teams` | String | only if `assignees` is not specified | n/a | Comma separated list of team names without the org prefix with optional [weights](#working-with-weighted-assignements). Issue will be assigned to the team members.<br/><br/>**Important Requirement:** if using the `teams` input parameter, you need to use a personal access token with `read:org` scope (the default `GITHUB_TOKEN` is not enough). |
| `numOfAssignee` | Number | false | n/a | Number of assignees that will be randomly picked from the teams or assignees. If not specified, assigns all users. |
| `abortIfPreviousAssignees` | Boolean | false | false | Flag that aborts the action if there were assignees previously. This does not cause the action to fail. |
| `removePreviousAssignees` | Boolean | false | false | Flag that removes assignees before assigning them (useful the issue is reasigned). |
| `allowNoAssignees` | Boolean | false | false | Flag that prevents the action from failing when there are no assignees. |
| `allowSelfAssign` | Boolean | false | true | Flag that allows self-assignment to the issue author.<br/><br/>This flag is ignored when working with PRs as self assigning a PR for review is forbidden by GitHub. |
| `issueNumber` | Number | false | n/a | Allows to override the issue number. This can be useful when context is missing. |
| `teamIsPullRequestReviewer` | Boolean | false | false | Sets team as the PR reviewer instead of a member of the team. |
| `failsIfUsersCannotBeAssigned` | Boolean | false | false | Flag that causes the action to fail if one ore more users cannot be assigned to an issue. If not set the invalid users are simply ignored. |

## Examples

Expand Down
3 changes: 3 additions & 0 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module.exports = {
testRegex: '/__tests__/.*.test.js$'
};
16 changes: 8 additions & 8 deletions node_modules/.package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

22 changes: 16 additions & 6 deletions node_modules/lint-staged/README.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

45 changes: 22 additions & 23 deletions node_modules/lint-staged/bin/lint-staged.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit a739fb4

Please sign in to comment.