Skip to content

Commit acbbe22

Browse files
committed
update inputs handlign
1 parent e283983 commit acbbe22

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

.github/workflows/onboard-new-repo.yml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,12 @@ name: 'Onboard New Repository with SAST'
33
on:
44
workflow_dispatch:
55
inputs:
6+
organization:
7+
description: 'Organization name (e.g., MetaMask)'
8+
required: true
9+
type: string
610
repository:
7-
description: 'Repository to onboard (format: owner/repo, e.g., MetaMask/snaps)'
11+
description: 'Repository name (e.g., snaps)'
812
required: true
913
type: string
1014
repository_dispatch:
@@ -26,10 +30,12 @@ jobs:
2630
id: target
2731
run: |
2832
if [ "${{ github.event_name }}" = "repository_dispatch" ]; then
29-
REPO="${{ github.event.client_payload.repository }}"
33+
ORG="${{ github.event.client_payload.organization }}"
34+
REPO_NAME="${{ github.event.client_payload.repository }}"
35+
REPO="$ORG/$REPO_NAME"
3036
BASE_BRANCH="${{ github.event.client_payload.base_branch }}"
3137
else
32-
REPO="${{ inputs.repository }}"
38+
REPO="${{ inputs.organization }}/${{ inputs.repository }}"
3339
BASE_BRANCH=""
3440
fi
3541

0 commit comments

Comments
 (0)