You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[](https://img.shields.io/github/commits-since/leonsteinhaeuser/project-beta-automations/latest)
This repository provides the ability to automate GitHub issues and pull requests for [Github Projects (Beta)](https://docs.github.com/en/issues/trying-out-the-new-projects-experience/about-projects). To do this, it automates the **Status** and user-defined fields to put issues and pull requests into the desired status, and therefore the desired column in the Board view. If the issue or pull request does not already exist in the project, it will be added.
4
12
5
13
Note: GITHUB_TOKEN does not have the necessary scopes to access projects (beta).
@@ -14,16 +22,19 @@ Since the issues and pull requests from this repository are also managed by this
14
22
15
23
## Variables
16
24
17
-
| Variable | Required | Description |
18
-
| ------------------ | -------- |----------- |
19
-
|`gh_token`| true | The GitHub token to use for the automation. |
20
-
|`user`| false | The GitHub username that owns the projectboard. Either a user or an organization must be specified. |
21
-
|`organization`| false | The GitHub organization that owns the projectboard. Either a user or an organization must be specified. |
22
-
|`project_id`| true | The projectboard id. |
23
-
|`resource_node_id`| true | The id of the resource node. |
24
-
|`status_value`| false | The status value to set. Must be one of the values defined in your project board **Status field settings**. If left unspecified, new items are added without an explicit status, and existing items are left alone. |
25
-
|`operation_mode`| false | The operation mode to use. Must be one of `custom_field`, `status`. Defaults to: `status`|
26
-
|`custom_field_values`| false | Provides the possibility to change custom fields. To be applied the **operation_mode** must be set to `custom_field`. For the json definition refer to [JSON-Definition](#JSON-Definition)|
|`gh_token`| false | The GitHub token to use for the automation. For App instructions refer to [GH App Auth](#GH-App-Auth). (`gh_token` or `gh_app_*` must be defined) |
28
+
|`gh_app_ID`| false | The GitHub App ID used for App authentication. For App instructions refer to [GH App Auth](#GH-App-Auth). (`gh_token` or `gh_app_*` must be defined) |
29
+
|`gh_app_installation_ID`| false | The Github App installation ID binding the App to the target org. For App instructions refer to [GH App Auth](#GH-App-Auth). (`gh_token` or `gh_app_*` must be defined) |
30
+
|`gh_app_secret_key`| false | The Github App Secret key used to sign App JWT tokens. For App instructions refer to [GH App Auth](#GH-App-Auth). (`gh_token` or `gh_app_*` must be defined) |
31
+
|`user`| false | The GitHub username that owns the projectboard. Either a user or an organization must be specified. |
32
+
|`organization`| false | The GitHub organization that owns the projectboard. Either a user or an organization must be specified. |
33
+
|`project_id`| true | The projectboard id. |
34
+
|`resource_node_id`| true | The id of the resource node. |
35
+
|`status_value`| false | The status value to set. Must be one of the values defined in your project board **Status field settings**. If left unspecified, new items are added without an explicit status, and existing items are left alone. |
36
+
|`operation_mode`| false | The operation mode to use. Must be one of `custom_field`, `status`. Defaults to: `status`|
37
+
|`custom_field_values`| false | Provides the possibility to change custom fields. To be applied the **operation_mode** must be set to `custom_field`. For the json definition refer to [JSON-Definition](#JSON-Definition)|
27
38
28
39
## Getting started
29
40
@@ -123,6 +134,29 @@ jobs:
123
134
status_value: ${{ env.done }} # Target status
124
135
```
125
136
137
+
## GH App Auth
138
+
139
+
To leverage the App authentication with this action the following steps are needed:
140
+
141
+
- Create a GitHub App under your user or organisation as described in the [GitHub documentation](https://docs.github.com/en/developers/apps/building-github-apps/creating-a-github-app), note the App ID
142
+
- Set the needed GitHub App permissions in order for the newly create App to access and manage Org Project, as described in the [GitHub documentation](https://docs.github.com/en/developers/apps/managing-github-apps/editing-a-github-apps-permissions). The minimum required permissions are:
143
+
- Repo: Actions: RW
144
+
- Repo: Checks: RO
145
+
- Repo: Contents: RO
146
+
- Repo: Environments: RO
147
+
- Repo: Metadata: RO
148
+
- Repo: PR: RW
149
+
- Repo: Commit statuses: RO
150
+
- Org: Members: RO
151
+
- Org: Projects: RW
152
+
- Create a private key to authenticate the newly created GitHub App as described in the [GitHub documentation](https://docs.github.com/en/developers/apps/building-github-apps/authenticating-with-github-apps), treat the downloaded key as sensitive material, store it in a GitHub secret accessible by this action.
153
+
- Install the app in the target organisation, note the installation ID
154
+
- Configure this action with
155
+
- `gh_app_secret_key` containing the aforementioned private key
156
+
- `gh_app_ID`containing the app ID, auto-generated by GitHub in the first step
157
+
- `gh_app_installation_ID`containing the installation ID, auto-generated by GitHub in the previous step. Binging the App to the Org
0 commit comments