Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add random to #35

Merged
merged 5 commits into from
Jan 11, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
## v1.9

`2021.01.11`

- feat: add random to. [#35](https://github.com/actions-cool/issues-helper/pull/35)

## v1.8

`2021.01.07`
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2020 xrkffgg
Copyright (c) 2020-present xrkffgg

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
55 changes: 29 additions & 26 deletions README.en-US.md
Original file line number Diff line number Diff line change
Expand Up @@ -134,12 +134,13 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Add assigness
uses: actions-cool/issues-helper@v1.8
uses: actions-cool/issues-helper@v1.9
with:
actions: 'add-assignees'
token: ${{ secrets.GITHUB_TOKEN }}
issue-number: ${{ github.event.issue.number }}
assignees: 'xxx' or 'xx1,xx2'
random-to: 1
```

| Param | Desc | Type | Required |
Expand All @@ -148,6 +149,7 @@ jobs:
| token | [Token explain](#token) | string | ✔ |
| issue-number | The number of issue | number | ✔ |
| assignees | Designated person. No operation when no input or empty character | string | ✖ |
| random-to | When set, it will be randomly selected in assignees | number | ✖ |

- `actions` support multiple and separated by comma. Like: `add-assignees,add-labels`
- The `name` can be modified according to the actual situation
Expand All @@ -174,7 +176,7 @@ jobs:
if: contains(github.event.issue.body, 'xxx') == false
steps:
- name: Add labels
uses: actions-cool/issues-helper@v1.8
uses: actions-cool/issues-helper@v1.9
with:
actions: 'add-labels'
token: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -199,7 +201,7 @@ Close the specified issue.

```yml
- name: Close issue
uses: actions-cool/issues-helper@v1.8
uses: actions-cool/issues-helper@v1.9
with:
actions: 'close-issue'
token: ${{ secrets.GITHUB_TOKEN }}
Expand Down Expand Up @@ -232,7 +234,7 @@ jobs:
if: github.event.label.name == 'xxx'
steps:
- name: Create comment
uses: actions-cool/issues-helper@v1.8
uses: actions-cool/issues-helper@v1.9
with:
actions: 'create-comment'
token: ${{ secrets.GITHUB_TOKEN }}
Expand Down Expand Up @@ -276,7 +278,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Create issue
uses: actions-cool/issues-helper@v1.8
uses: actions-cool/issues-helper@v1.9
with:
actions: 'create-issue'
token: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -295,6 +297,7 @@ jobs:
| body | The body of the new issue | string | ✖ |
| labels | The labels for the new issue | string | ✖ |
| assignees | The assignees for the new issue | string | ✖ |
| random-to | When set, it will be randomly selected in assignees | number | ✖ |
| contents | Add [reaction](#reactions-types) | string | ✖ |

- `title` default is `Default Title`
Expand All @@ -308,7 +311,7 @@ According to [`comment-id`](#comment-id) delete the specified comment.

```yml
- name: Delete comment
uses: actions-cool/issues-helper@v1.8
uses: actions-cool/issues-helper@v1.9
with:
actions: 'delete-comment'
token: ${{ secrets.GITHUB_TOKEN }}
Expand Down Expand Up @@ -340,7 +343,7 @@ jobs:
if: github.event.label.name == 'invalid'
steps:
- name: Lock issue
uses: actions-cool/issues-helper@v1.8
uses: actions-cool/issues-helper@v1.9
with:
actions: 'lock-issue'
token: ${{ secrets.GITHUB_TOKEN }}
Expand Down Expand Up @@ -371,7 +374,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: mark-duplicate
uses: actions-cool/issues-helper@v1.8
uses: actions-cool/issues-helper@v1.9
with:
actions: 'mark-duplicate'
token: ${{ secrets.GITHUB_TOKEN }}
Expand Down Expand Up @@ -399,7 +402,7 @@ Open the specified issue.

```yml
- name: Open issue
uses: actions-cool/issues-helper@v1.8
uses: actions-cool/issues-helper@v1.9
with:
actions: 'open-issue'
token: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -420,7 +423,7 @@ Remove the person designated by issue.

```yml
- name: Remove assignees
uses: actions-cool/issues-helper@v1.8
uses: actions-cool/issues-helper@v1.9
with:
actions: 'remove-assignees'
token: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -443,7 +446,7 @@ Remove the specified labels.

```yml
- name: Remove labels
uses: actions-cool/issues-helper@v1.8
uses: actions-cool/issues-helper@v1.9
with:
actions: 'remove-labels'
token: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -468,7 +471,7 @@ Replace the labels of issue.

```yml
- name: Set labels
uses: actions-cool/issues-helper@v1.8
uses: actions-cool/issues-helper@v1.9
with:
actions: 'set-labels'
token: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -491,7 +494,7 @@ Unlock the specified issue.

```yml
- name: Unlock issue
uses: actions-cool/issues-helper@v1.8
uses: actions-cool/issues-helper@v1.9
with:
actions: 'unlock-issue'
token: ${{ secrets.GITHUB_TOKEN }}
Expand Down Expand Up @@ -524,7 +527,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Update comment
uses: actions-cool/issues-helper@v1.8
uses: actions-cool/issues-helper@v1.9
with:
actions: 'update-comment'
token: ${{ secrets.GITHUB_TOKEN }}
Expand Down Expand Up @@ -552,7 +555,7 @@ Update the specified issue according to the `issue-number`.

```yml
- name: Update issue
uses: actions-cool/issues-helper@v1.8
uses: actions-cool/issues-helper@v1.9
with:
actions: 'update-issue'
token: ${{ secrets.GITHUB_TOKEN }}
Expand Down Expand Up @@ -602,7 +605,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: welcome
uses: actions-cool/issues-helper@v1.8
uses: actions-cool/issues-helper@v1.9
with:
actions: 'welcome'
token: ${{ secrets.GITHUB_TOKEN }}
Expand Down Expand Up @@ -645,7 +648,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: check-inactive
uses: actions-cool/issues-helper@v1.8
uses: actions-cool/issues-helper@v1.9
with:
actions: 'check-inactive'
token: ${{ secrets.GITHUB_TOKEN }}
Expand Down Expand Up @@ -698,7 +701,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: check-issue
uses: actions-cool/issues-helper@v1.8
uses: actions-cool/issues-helper@v1.9
with:
actions: 'check-issue'
token: ${{ secrets.GITHUB_TOKEN }}
Expand Down Expand Up @@ -737,7 +740,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: close-issues
uses: actions-cool/issues-helper@v1.8
uses: actions-cool/issues-helper@v1.9
with:
actions: 'close-issues'
token: ${{ secrets.GITHUB_TOKEN }}
Expand Down Expand Up @@ -771,7 +774,7 @@ Find the current warehouse issue No. 1, the creator is k and the content contain

```yml
- name: Find comments
uses: actions-cool/issues-helper@v1.8
uses: actions-cool/issues-helper@v1.9
with:
actions: 'find-comments'
token: ${{ secrets.GITHUB_TOKEN }}
Expand Down Expand Up @@ -819,7 +822,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: lock-issues
uses: actions-cool/issues-helper@v1.8
uses: actions-cool/issues-helper@v1.9
with:
actions: 'lock-issues'
token: ${{ secrets.GITHUB_TOKEN }}
Expand Down Expand Up @@ -865,7 +868,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: month-statistics
uses: actions-cool/issues-helper@v1.8
uses: actions-cool/issues-helper@v1.9
with:
actions: 'month-statistics'
token: ${{ secrets.GITHUB_TOKEN }}
Expand Down Expand Up @@ -908,7 +911,7 @@ jobs:
if: github.event.label.name == 'watch'
steps:
- name: find comments
uses: actions-cool/issues-helper@v1.8
uses: actions-cool/issues-helper@v1.9
id: fcid
with:
actions: 'find-comments'
Expand All @@ -919,7 +922,7 @@ jobs:

- name: create comment
if: ${{ steps.fcid.outputs.comments.length == 0 }}
uses: actions-cool/issues-helper@v1.8
uses: actions-cool/issues-helper@v1.9
with:
actions: 'create-comment'
token: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -928,7 +931,7 @@ jobs:

- name: update comment
if: ${{ steps.fcid.outputs.comments.length == 1 }}
uses: actions-cool/issues-helper@v1.8
uses: actions-cool/issues-helper@v1.9
with:
actions: 'update-comment'
token: ${{ secrets.GITHUB_TOKEN }}
Expand Down Expand Up @@ -960,7 +963,7 @@ When the token is not filled in actions or the corresponding secrets are not add

```yml
- name: Create issue
uses: actions-cool/issues-helper@v1.8
uses: actions-cool/issues-helper@v1.9
id: createissue
with:
actions: 'create-issue'
Expand Down
Loading