File tree Expand file tree Collapse file tree 4 files changed +36
-19
lines changed Expand file tree Collapse file tree 4 files changed +36
-19
lines changed Original file line number Diff line number Diff line change 1
1
name : Auto Assign Project Local
2
2
3
3
on : [pull_request, issues]
4
+ env :
5
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
4
6
5
7
jobs :
6
8
assign_one_project :
7
9
runs-on : ubuntu-latest
8
10
name : Assign to One Project
9
11
steps :
10
12
- 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
12
14
if : github.event.action == 'opened'
13
15
with :
14
16
project : ' https://github.com/srggrs/assign-one-project-github-action/projects/2'
Original file line number Diff line number Diff line change @@ -21,27 +21,50 @@ This action has been modified from the original action from [masutaka](https://g
21
21
22
22
** Required** The url of the project to be assigned to.
23
23
24
- ### ` GITHUB_TOKEN `
25
-
26
- ** Required** The enviromental variable for query github API.
27
-
28
24
## Example usage
29
25
30
- Example of action:
26
+ Examples of action:
27
+
28
+ ### Repository project
31
29
32
30
``` yaml
33
31
name : Auto Assign Project
34
32
35
33
on : [pull_request, issues]
34
+ env :
35
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
36
36
37
37
jobs :
38
38
assign_one_project :
39
39
runs-on : ubuntu-latest
40
40
name : Assign to One Project
41
41
steps :
42
42
- 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
45
45
with :
46
46
project : ' https://github.com/srggrs/assign-one-project-github-action/projects/2'
47
47
` ` `
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
+
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
+ ` ` `
Original file line number Diff line number Diff line change 1
1
# action.yml
2
2
name : ' Assign to One Project'
3
3
description : ' Assign new Issue or Pull Request to default project dashboard column'
4
+ author : srggrs
4
5
inputs :
5
6
project : # id of input
6
7
description : ' Assigned Project'
7
8
required : true
8
- github_token :
9
- description : ' Repo token'
10
- required : true
11
- default : ${{ secrets.GITHUB_TOKEN }}
12
-
9
+
13
10
runs :
14
11
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 '
16
13
args :
17
14
- ${{ inputs.project }}
18
- - ${{ inputs.github_token }}
19
15
20
16
branding :
21
17
icon : ' box'
Original file line number Diff line number Diff line change 1
1
#! /bin/sh -l
2
2
3
- echo " ***********************************"
4
- env
5
- echo " ***********************************"
6
-
7
3
PROJECT_URL=" $INPUT_PROJECT "
8
4
if [ -z " $PROJECT_URL " ]; then
9
5
echo " PROJECT_URL is not defined." >&2
You can’t perform that action at this time.
0 commit comments