Skip to content

Commit 2177105

Browse files
committed
open-pr: allow acting on behalf of a user
The main use case for this workflow is to be triggered via `/open pr` commands (see for example git-for-windows/git#4141 (comment)). In such a scenario, this workflow is triggered using the installation access token of the GitForWindowsHelper GitHub App, which does not really have any identity we can use. Let's allow specifying explicitly on whose behalf we're running this, so that the commit author can be configured correctly. Signed-off-by: Johannes Schindelin <[email protected]>
1 parent 185383e commit 2177105

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

.github/workflows/open-pr.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,15 @@ on:
1212
description: The new version of the package
1313
type: string
1414
required: true
15+
actor:
16+
description: The GitHub user on whose behalf this workflow is run
17+
required: false
1518

1619
env:
1720
PACKAGE_TO_UPGRADE: ${{ github.event.inputs.package }}
1821
UPGRADE_TO_VERSION: ${{ github.event.inputs.version }}
1922
OWNER: 'git-for-windows'
20-
ACTOR: "${{ github.triggering_actor }}"
23+
ACTOR: "${{ github.event.inputs.actor || github.triggering_actor }}"
2124

2225
jobs:
2326
open-pr:

0 commit comments

Comments
 (0)