Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
62fce79
Extend the `IConfig` interface as needed for 3rd-party projects
dscho Aug 31, 2025
23c6d23
IConfig: rename the attribute defining the `upstream-repo`'s org
dscho Sep 8, 2025
9890596
IConfig: move `repo.owners` to a better place
dscho Sep 8, 2025
211dbb2
Actions: accept the `config` input
dscho Aug 31, 2025
24a0e2a
Install `typia`
dscho Aug 31, 2025
255ece3
npx typia setup
dscho Aug 31, 2025
a603513
CIHelper: validate the user-provided `config` Action input
dscho Aug 31, 2025
e68da6a
IConfig: avoid "anonymous types"
dscho Aug 31, 2025
d25eafa
Include the `LintCommit` configuration in `IConfig`
dscho Oct 6, 2025
07b2da3
/submit: use correct URL in the "Submitted as" message
dscho Sep 2, 2025
d182e11
parsePRCommentURLInput/parsePRURLInput: reuse pullRequestKey machinery
dscho Sep 9, 2025
ee24134
CIHelper: move the Dugite prep a bit later
dscho Sep 9, 2025
a61a27c
Add a way to create/update Check Runs
dscho Sep 9, 2025
eba8635
check-run: use a reasonable default for `details-url`
dscho Oct 6, 2025
5053061
check-run: use Typia for type checking
dscho Oct 6, 2025
911a259
check-run: use Typia for type checking
dscho Oct 6, 2025
2096531
check-run: persist parameters in an Action state
dscho Oct 3, 2025
bc996ad
check-run: automatically update the conclusion in a `post` step
dscho Sep 9, 2025
c127af2
CIHelper: add a way to create the initial Git notes
dscho Sep 1, 2025
7d8d4f2
Add the `initialize-git-notes` Action
dscho Sep 1, 2025
648d8b1
mail-archive-helper: recommend `initialize-git-notes` over `misc-helper`
dscho Oct 3, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/push-github-actions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ jobs:
# Now, add the generated files
git add -A dist/ &&
# Remove the rest
git rm -r -- \* ':(exclude)dist/' ':(exclude)*/action.yml' ':(exclude)*/index.js' &&
git rm -r -- \* ':(exclude)dist/' ':(exclude)*/action.yml' ':(exclude)*/index.js' ':(exclude)*/post.js' &&

# Now make that fake merge commit
tree=$(git write-tree) &&
Expand Down
1 change: 1 addition & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@
"tbdiff",
"Thái",
"Truthy",
"typia",
"unportable",
"vger",
"VSTS",
Expand Down
53 changes: 53 additions & 0 deletions check-run/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: 'Create or update a Check Run'
description: 'Mirrors a workflow run to a Check Run of a Pull Request in a different repository'
author: 'Johannes Schindelin'
inputs:
config:
description: 'The GitGitGadget configuration to use (see https://github.com/gitgitgadget/gitgitgadget/blob/HEAD/lib/project-config.ts)'
default: '' # sadly, ${{ vars.CONFIG }} does not work, and documentation about what contexts are permissible here is sorely missing
pr-repo-token:
description: 'The access token to work on the repository that holds PRs and state'
required: true
upstream-repo-token:
description: 'The access token to work on PRs in the upstream repository'
required: false
test-repo-token:
description: 'The access token to work on PRs in the test repository'
required: false
pr-url:
description: 'The URL of the Pull Request (or Pull Request comment)'
required: false
check-run-id:
description: 'The Check Run to update (if empty, a new one will be created)'
default: ''
name:
description: 'The name of the CheckRun (required if check-run-id is empty)'
default: ''
title:
description: 'The Check Run title (required when creating a new one)'
default: ''
summary:
description: 'The Check Run summary (required when creating a new one)'
default: ''
text:
description: 'The Check Run text (required when creating a new one)'
default: ''
details-url:
description: 'The details URL of the Check Run (required when creating a new one)'
default: '${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}'
conclusion:
description: 'If set, the Check Run will be marked as completed'
default: ''
job-status:
description: 'Needed at the end of the job'
default: ${{ job.status }}
outputs:
check-run-id:
description: 'The ID of the created or updated Check Run'
runs:
using: 'node20'
main: './index.js'
post: './post.js'
branding:
icon: 'git-commit'
color: 'orange'
13 changes: 13 additions & 0 deletions check-run/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
async function run() {
const { CIHelper } = await import("../dist/index.js")

try {
const ci = new CIHelper()
ci.setupGitHubAction({ createOrUpdateCheckRun: true })
} catch (e) {
console.error(e)
process.exitCode = 1
}
}

run()
13 changes: 13 additions & 0 deletions check-run/post.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
async function run() {
const { CIHelper } = await import("../dist/index.js")

try {
const ci = new CIHelper()
ci.setupGitHubAction({ createOrUpdateCheckRun: "post" })
} catch (e) {
console.error(e)
process.exitCode = 1
}
}

run()
3 changes: 3 additions & 0 deletions handle-new-mails/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ name: 'Handle new mails'
description: 'Processes new mails on the Git mailing list'
author: 'Johannes Schindelin'
inputs:
config:
description: 'The GitGitGadget configuration to use (see https://github.com/gitgitgadget/gitgitgadget/blob/HEAD/lib/project-config.ts)'
default: '' # sadly, ${{ vars.CONFIG }} does not work, and documentation about what contexts are permissible here is sorely missing
pr-repo-token:
description: 'The access token to work on the repository that holds PRs and state'
required: true
Expand Down
3 changes: 3 additions & 0 deletions handle-pr-comment/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ name: 'Handle PR Comment'
description: 'Handles slash commands such as /submit and /preview'
author: 'Johannes Schindelin'
inputs:
config:
description: 'The GitGitGadget configuration to use (see https://github.com/gitgitgadget/gitgitgadget/blob/HEAD/lib/project-config.ts)'
default: '' # sadly, ${{ vars.CONFIG }} does not work, and documentation about what contexts are permissible here is sorely missing
pr-repo-token:
description: 'The access token to work on the repository that holds PRs and state'
required: true
Expand Down
4 changes: 2 additions & 2 deletions handle-pr-comment/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ async function run() {
const { CIHelper } = await import("../dist/index.js")

const ci = new CIHelper()
const { owner, commentId } = ci.parsePRCommentURLInput()
const { owner, comment_id } = ci.parsePRCommentURLInput()

await ci.setupGitHubAction()
await ci.handleComment(owner, commentId)
await ci.handleComment(owner, comment_id)
}

run()
3 changes: 3 additions & 0 deletions handle-pr-push/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ name: 'Handle PR Pushes'
description: 'Handles when a PR was pushed'
author: 'Johannes Schindelin'
inputs:
config:
description: 'The GitGitGadget configuration to use (see https://github.com/gitgitgadget/gitgitgadget/blob/HEAD/lib/project-config.ts)'
default: '' # sadly, ${{ vars.CONFIG }} does not work, and documentation about what contexts are permissible here is sorely missing
pr-repo-token:
description: 'The access token to work on the repository that holds PRs and state'
required: true
Expand Down
4 changes: 2 additions & 2 deletions handle-pr-push/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ async function run() {
const { CIHelper } = await import("../dist/index.js")

const ci = new CIHelper()
const { owner, prNumber } = ci.parsePRURLInput()
const { owner, pull_number } = ci.parsePRURLInput()

await ci.setupGitHubAction()
await ci.handlePush(owner, prNumber)
await ci.handlePush(owner, pull_number)
}

run()
20 changes: 20 additions & 0 deletions initialize-git-notes/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: 'Initialize the Git notes'
description: 'Creates initial, mostly empty Git notes for GitGitGadget to store its state in.'
author: 'Johannes Schindelin'
inputs:
config:
description: 'The GitGitGadget configuration to use (see https://github.com/gitgitgadget/gitgitgadget/blob/HEAD/lib/project-config.ts)'
default: '' # sadly, ${{ vars.CONFIG }} does not work, and documentation about what contexts are permissible here is sorely missing
pr-repo-token:
description: 'The access token to work on the repository that holds PRs and state'
required: true
initial-user:
description: 'The user that is initially the only one allowed to use GitGitGadget in the given project'
default: ${{ github.actor }}
required: true
runs:
using: 'node20'
main: './index.js'
branding:
icon: 'git-commit'
color: 'orange'
11 changes: 11 additions & 0 deletions initialize-git-notes/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
async function run() {
const { CIHelper } = await import("../dist/index.js")

const ci = new CIHelper()

await ci.setupGitHubAction({
createGitNotes: true,
})
}

run()
Loading