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
{{ message }}
This repository was archived by the owner on May 1, 2025. It is now read-only.
Copy file name to clipboardExpand all lines: README.md
+52-6Lines changed: 52 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -31,7 +31,7 @@ It is desirable, for example, for all Open Source and InnerSource projects to ha
31
31
## Use as a GitHub Action
32
32
33
33
1. Create a repository to host this GitHub Action or select an existing repository.
34
-
1. Create the env values from the sample workflow below (GH_TOKEN, GH_ACTOR, PR_TITLE, PR_BODY, and ORGANIZATION) with your information as repository secrets. More info on creating secrets can be found [here](https://docs.github.com/en/actions/security-guides/encrypted-secrets).
34
+
1. Create the env values from the sample workflow below (`GH_TOKEN`, `GH_ACTOR`, `PR_TITLE`, `PR_BODY`, and `ORGANIZATION`) with your information as repository secrets. More info on creating secrets can be found [here](https://docs.github.com/en/actions/security-guides/encrypted-secrets).
35
35
Note: Your GitHub token will need to have read/write access to all the repositories in the `repos.json` file.
36
36
1. Copy the below example workflow to your repository and put it in the `.github/workflows/` directory with the file extension `.yml` (ie. `.github/workflows/auto-contrib-file.yml`)
37
37
@@ -45,11 +45,12 @@ This action can be configured to authenticate with GitHub App Installation or Pe
|`GH_APP_ID`| True |`""`| GitHub Application ID. See [documentation](https://docs.github.com/en/apps/creating-github-apps/authenticating-with-a-github-app/about-authentication-with-a-github-app) for more details. |
51
-
|`GH_APP_INSTALLATION_ID`| True |`""`| GitHub Application Installation ID. See [documentation](https://docs.github.com/en/apps/creating-github-apps/authenticating-with-a-github-app/about-authentication-with-a-github-app) for more details. |
52
-
|`GH_APP_PRIVATE_KEY`| True |`""`| GitHub Application Private Key. See [documentation](https://docs.github.com/en/apps/creating-github-apps/authenticating-with-a-github-app/about-authentication-with-a-github-app) for more details. |
|`GH_APP_ID`| True |`""`| GitHub Application ID. See [documentation](https://docs.github.com/en/apps/creating-github-apps/authenticating-with-a-github-app/about-authentication-with-a-github-app) for more details. |
51
+
|`GH_APP_INSTALLATION_ID`| True |`""`| GitHub Application Installation ID. See [documentation](https://docs.github.com/en/apps/creating-github-apps/authenticating-with-a-github-app/about-authentication-with-a-github-app) for more details. |
52
+
|`GH_APP_PRIVATE_KEY`| True |`""`| GitHub Application Private Key. See [documentation](https://docs.github.com/en/apps/creating-github-apps/authenticating-with-a-github-app/about-authentication-with-a-github-app) for more details. |
53
+
|`GITHUB_APP_ENTERPRISE_ONLY`| False |`false`| Set this input to `true` if your app is created in GHE and communicates with GHE. |
53
54
54
55
##### Personal Access Token (PAT)
55
56
@@ -106,6 +107,51 @@ jobs:
106
107
PR_BODY: ${{ secrets.PR_BODY }}
107
108
```
108
109
110
+
#### Using GitHub app
111
+
112
+
```yaml
113
+
name: Find proper repos and open CONTRIBUTING.md prs
114
+
115
+
on:
116
+
workflow_dispatch:
117
+
118
+
permissions:
119
+
contents: read
120
+
121
+
jobs:
122
+
build:
123
+
name: Open CONTRIBUTING.md in OSS if it doesnt exist
# GITHUB_APP_ENTERPRISE_ONLY: True --> Set to true when created GHE App needs to communicate with GHE api
147
+
GH_ENTERPRISE_URL: ${{ github.server_url }}
148
+
# GH_TOKEN: ${{ secrets.GH_TOKEN }} --> the token input is not used if the github app inputs are set
149
+
ORGANIZATION: ${{ secrets.ORGANIZATION }}
150
+
GH_ACTOR: ${{ secrets.GH_ACTOR }}
151
+
PR_TITLE: ${{ secrets.PR_TITLE }}
152
+
PR_BODY: ${{ secrets.PR_BODY }}
153
+
```
154
+
109
155
## Scaling for large organizations
110
156
111
157
- GitHub Actions workflows have time limits currently set at 72 hours per run. If you are operating on more than 1400 repos or so with this action, it will take several runs to complete.
0 commit comments