Skip to content

Commit 542bda4

Browse files
committed
WIP (fill in TBD) Use vars.CONFIG with all of GitGitGadget's GitHub Actions
The GitHub Actions of GitGitGadget just learned the trick to accept the project configuration as an input parameter. The idea is to store this configuration in the repository variable called `CONFIG`. Here is the code change to make use of this repository variable. Obviously, this means that the workflows should no longer run in forks without said configuration. For details about configuring GitGitGadget to support projects other than Git, see TBD. Signed-off-by: Johannes Schindelin <[email protected]>
1 parent de82391 commit 542bda4

File tree

5 files changed

+10
-0
lines changed

5 files changed

+10
-0
lines changed

.github/workflows/handle-new-mails.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ concurrency:
1010
jobs:
1111
handle-new-mails:
1212
runs-on: ubuntu-latest
13+
if: vars.CONFIG != ''
1314

1415
steps:
1516
- uses: actions/create-github-app-token@v1
@@ -35,6 +36,7 @@ jobs:
3536
repositories: git
3637
- uses: gitgitgadget/gitgitgadget/handle-new-mails@v1
3738
with:
39+
config: ${{ vars.CONFIG }}
3840
pr-repo-token: ${{ steps.gitgitgadget-git-token.outputs.token }}
3941
upstream-repo-token: ${{ steps.git-git-token.outputs.token }}
4042
test-repo-token: ${{ steps.dscho-git-token.outputs.token }}

.github/workflows/handle-pr-comment.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ concurrency:
1919
jobs:
2020
handle-pr-comment:
2121
runs-on: ubuntu-latest
22+
if: vars.CONFIG != ''
2223

2324
steps:
2425
- uses: actions/create-github-app-token@v1
@@ -84,6 +85,7 @@ jobs:
8485
echo "check_run_id=$check_run_id" >> $GITHUB_OUTPUT
8586
- uses: gitgitgadget/gitgitgadget/handle-pr-comment@v1
8687
with:
88+
config: ${{ vars.CONFIG }}
8789
pr-repo-token: ${{ steps.gitgitgadget-git-token.outputs.token }}
8890
upstream-repo-token: ${{ steps.git-git-token.outputs.token }}
8991
test-repo-token: ${{ steps.dscho-git-token.outputs.token }}

.github/workflows/handle-pr-push.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ concurrency:
1919
jobs:
2020
handle-pr-push:
2121
runs-on: ubuntu-latest
22+
if: vars.CONFIG != ''
2223

2324
steps:
2425
- uses: actions/create-github-app-token@v1
@@ -82,6 +83,7 @@ jobs:
8283
echo "check_run_id=$check_run_id" >> $GITHUB_OUTPUT
8384
- uses: gitgitgadget/gitgitgadget/handle-pr-push@v1
8485
with:
86+
config: ${{ vars.CONFIG }}
8587
pr-repo-token: ${{ steps.gitgitgadget-git-token.outputs.token }}
8688
upstream-repo-token: ${{ steps.git-git-token.outputs.token }}
8789
test-repo-token: ${{ steps.dscho-git-token.outputs.token }}

.github/workflows/update-mail-to-commit-notes.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ concurrency:
1111
jobs:
1212
update-mail-to-commit-notes:
1313
runs-on: ubuntu-latest
14+
if: vars.CONFIG != ''
1415

1516
steps:
1617
- uses: actions/create-github-app-token@v1
@@ -22,4 +23,5 @@ jobs:
2223
repositories: git
2324
- uses: gitgitgadget/gitgitgadget/update-mail-to-commit-notes@v1
2425
with:
26+
config: ${{ vars.CONFIG }}
2527
pr-repo-token: ${{ steps.gitgitgadget-git-token.outputs.token }}

.github/workflows/update-prs.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ concurrency:
1010
jobs:
1111
update-prs:
1212
runs-on: ubuntu-latest
13+
if: vars.CONFIG != ''
1314

1415
steps:
1516
- uses: actions/create-github-app-token@v1
@@ -35,6 +36,7 @@ jobs:
3536
repositories: git
3637
- uses: gitgitgadget/gitgitgadget/update-prs@v1
3738
with:
39+
config: ${{ vars.CONFIG }}
3840
pr-repo-token: ${{ steps.gitgitgadget-git-token.outputs.token }}
3941
upstream-repo-token: ${{ steps.git-git-token.outputs.token }}
4042
test-repo-token: ${{ steps.dscho-git-token.outputs.token }}

0 commit comments

Comments
 (0)