Skip to content

Commit 4e1fbe6

Browse files
authored
Merge pull request #37 from clouddrove/issue-437
feat: added auto assign assignee to the PR workflow
2 parents 34ad4f7 + fc0582c commit 4e1fbe6

File tree

3 files changed

+48
-0
lines changed

3 files changed

+48
-0
lines changed
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Assignees
2+
3+
on:
4+
workflow_call:
5+
inputs:
6+
assignees:
7+
description: 'A list of assignees(GitHub user name) to be added to PR'
8+
required: true
9+
type: string
10+
11+
secrets:
12+
GITHUB:
13+
description: 'Your GitHub token for authentication.'
14+
required: true
15+
16+
jobs:
17+
assign:
18+
runs-on: ubuntu-latest
19+
steps:
20+
- uses: wow-actions/auto-assign@v3
21+
with:
22+
GITHUB_TOKEN: ${{ secrets.GITHUB }}
23+
assignees: ${{ inputs.assignees }}

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ Above example is just a simple example to call workflow from github shared workf
5353
3. [Docker Workflow](https://github.com/clouddrove/github-shared-workflows/blob/master/docs/docker.md)
5454
* [Example for scan and push docker image on Dockerhub](https://github.com/clouddrove/github-shared-workflows/blob/master/docs/docker.md#example-for-scan-and-push-docker-image-on-dockerhub)
5555
* [Example for scan and push docker image on ECR](https://github.com/clouddrove/github-shared-workflows/blob/master/docs/docker.md#example-for-scan-and-push-docker-image-on-ecr)
56+
4. [Auto Assign Assignee Workflow](https://github.com/clouddrove/github-shared-workflows/blob/master/docs/auto-assignee.md)
5657
5758
## Feedback
5859
If you come accross a bug or have any feedback, please log it in our [issue tracker](https://github.com/clouddrove/github-shared-workflows/issues), or feel free to drop us an email at [[email protected]](mailto:[email protected]).

docs/auto-assignee.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
## [Auto Assign Assignee Workflow](https://github.com/clouddrove/github-shared-workflows/blob/master/.github/workflows/auto_assignee.yml)
2+
3+
This workflow automates process for assigning assignees to the PR which would opened or reopened from a users list. Workflows have been added in `.github/workflows/auto_assignee.yml`
4+
5+
#### Usage
6+
Below workflow can be used to automatically assign the assignee to a pull request (PR) when the request is opened or reopened from the specified branch. If we provide a list of users, it will randomly select one user and assign as assignee to the PR.
7+
8+
#### Example
9+
```yaml
10+
name: Auto Assign PRs
11+
12+
on:
13+
pull_request:
14+
types: [opened, reopened]
15+
16+
workflow_dispatch:
17+
jobs:
18+
assign-pr:
19+
uses: clouddrove/github-shared-workflows/.github/workflows/auto_assignee.yml@master
20+
secrets:
21+
GITHUB: ${{ secrets.TOKEN_GITHUB }}
22+
with:
23+
assignees: #list of usernames of assignees
24+
```

0 commit comments

Comments
 (0)