Skip to content

Commit 022a1bf

Browse files
author
Srg
committed
prepare release 1.1.0
1 parent 8b46935 commit 022a1bf

File tree

4 files changed

+36
-19
lines changed

4 files changed

+36
-19
lines changed

.github/workflows/main.yml

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,16 @@
11
name: Auto Assign Project Local
22

33
on: [pull_request, issues]
4+
env:
5+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
46

57
jobs:
68
assign_one_project:
79
runs-on: ubuntu-latest
810
name: Assign to One Project
911
steps:
1012
- name: Run assignment to one project
11-
uses: srggrs/assign-one-project-github-action@1.0.4
13+
uses: srggrs/assign-one-project-github-action@1.1.0
1214
if: github.event.action == 'opened'
1315
with:
1416
project: 'https://github.com/srggrs/assign-one-project-github-action/projects/2'

README.md

+30-7
Original file line numberDiff line numberDiff line change
@@ -21,27 +21,50 @@ This action has been modified from the original action from [masutaka](https://g
2121

2222
**Required** The url of the project to be assigned to.
2323

24-
### `GITHUB_TOKEN`
25-
26-
**Required** The enviromental variable for query github API.
27-
2824
## Example usage
2925

30-
Example of action:
26+
Examples of action:
27+
28+
### Repository project
3129

3230
```yaml
3331
name: Auto Assign Project
3432

3533
on: [pull_request, issues]
34+
env:
35+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3636

3737
jobs:
3838
assign_one_project:
3939
runs-on: ubuntu-latest
4040
name: Assign to One Project
4141
steps:
4242
- name: Run assignment to one project
43-
uses: srggrs/assign-one-project-github-action@1.0.4
44-
if: github.event.action == 'opened'
43+
uses: srggrs/assign-one-project-github-action@1.1.0
44+
if: github.event.action == 'opened' # not required but speed up the action
4545
with:
4646
project: 'https://github.com/srggrs/assign-one-project-github-action/projects/2'
4747
```
48+
49+
### Organisation or User project
50+
51+
Generate a token from the Organisation settings or User Settings and add it as a secret in the repository secrets as `MY_GITHUB_TOKEN`
52+
53+
```yaml
54+
name: Auto Assign Project
55+
56+
on: [pull_request, issues]
57+
env:
58+
MY_GITHUB_TOKEN: ${{ secrets.MY_GITHUB_TOKEN }}
59+
60+
jobs:
61+
assign_one_project:
62+
runs-on: ubuntu-latest
63+
name: Assign to One Project
64+
steps:
65+
- name: Run assignment to one project
66+
uses: srggrs/assign-one-project-github-action@1.1.0
67+
if: github.event.action == 'opened' # not required but speed up the action
68+
with:
69+
project: 'https://github.com/srggrs/assign-one-project-github-action/projects/2'
70+
```

action.yml

+3-7
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,17 @@
11
# action.yml
22
name: 'Assign to One Project'
33
description: 'Assign new Issue or Pull Request to default project dashboard column'
4+
author: srggrs
45
inputs:
56
project: # id of input
67
description: 'Assigned Project'
78
required: true
8-
github_token:
9-
description: 'Repo token'
10-
required: true
11-
default: ${{ secrets.GITHUB_TOKEN }}
12-
9+
1310
runs:
1411
using: 'docker'
15-
image: 'docker://srggrs/assign-one-project-github-action:1.0.4'
12+
image: 'docker://srggrs/assign-one-project-github-action:1.1.0'
1613
args:
1714
- ${{ inputs.project }}
18-
- ${{ inputs.github_token }}
1915

2016
branding:
2117
icon: 'box'

entrypoint.sh

-4
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
11
#!/bin/sh -l
22

3-
echo "***********************************"
4-
env
5-
echo "***********************************"
6-
73
PROJECT_URL="$INPUT_PROJECT"
84
if [ -z "$PROJECT_URL" ]; then
95
echo "PROJECT_URL is not defined." >&2

0 commit comments

Comments
 (0)