Skip to content

Commit 7e002ae

Browse files
committed
Add the initialize-git-notes Action
This Action exposes the newly-added functionality to create the initial set of Git notes that GitGitGadget needs in order to persist its state. Signed-off-by: Johannes Schindelin <[email protected]>
1 parent 8207721 commit 7e002ae

File tree

2 files changed

+31
-0
lines changed

2 files changed

+31
-0
lines changed

initialize-git-notes/action.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: 'Initialize the Git notes'
2+
description: 'Creates initial, mostly empty Git notes for GitGitGadget to store its state in.'
3+
author: 'Johannes Schindelin'
4+
inputs:
5+
config:
6+
description: 'The GitGitGadget configuration to use (see https://github.com/gitgitgadget/gitgitgadget/blob/HEAD/lib/project-config.ts)'
7+
default: '' # sadly, ${{ vars.CONFIG }} does not work, and documentation about what contexts are permissible here is sorely missing
8+
pr-repo-token:
9+
description: 'The access token to work on the repository that holds PRs and state'
10+
required: true
11+
initial-user:
12+
description: 'The user that is initially the only one allowed to use GitGitGadget in the given project'
13+
default: ${{ github.actor }}
14+
required: true
15+
runs:
16+
using: 'node20'
17+
main: './index.js'
18+
branding:
19+
icon: 'git-commit'
20+
color: 'orange'

initialize-git-notes/index.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
async function run() {
2+
const { CIHelper } = await import("../dist/index.js")
3+
4+
const ci = new CIHelper()
5+
6+
await ci.setupGitHubAction({
7+
createGitNotes: true,
8+
})
9+
}
10+
11+
run()

0 commit comments

Comments
 (0)