Skip to content

Commit 4cb805d

Browse files
committed
ci: default FOSSA branch input to master
Set the workflow_dispatch branch input default to "master" so manual dispatches without an explicit input attach the scan to the master branch in the FOSSA dashboard. The previous empty-string default with a github.ref_name fallback worked but was confusing in the Run-workflow UI (the input rendered empty). Direct use of inputs.branch is now safe because the input always carries a value. JIRA: TRIVIAL risk: nonprod
1 parent e3524c5 commit 4cb805d

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

.github/workflows/fossa.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ on:
55
workflow_dispatch:
66
inputs:
77
branch:
8-
description: Branch label to attach to the FOSSA scan (defaults to the dispatched ref).
8+
description: Branch label to attach to the FOSSA scan.
99
required: false
10-
default: ""
10+
default: master
1111

1212
concurrency:
1313
group: fossa-${{ github.workflow }}-${{ github.ref }}
@@ -39,7 +39,7 @@ jobs:
3939
uses: fossas/fossa-action@ff70fe9fe17cbd2040648f1c45e8ec4e4884dcf3 # v1.9.0
4040
with:
4141
api-key: ${{ secrets.FOSSA_API_KEY }}
42-
branch: ${{ inputs.branch != '' && inputs.branch || github.ref_name }}
42+
branch: ${{ inputs.branch }}
4343

4444
- name: Run FOSSA test (policy gate)
4545
uses: fossas/fossa-action@ff70fe9fe17cbd2040648f1c45e8ec4e4884dcf3 # v1.9.0

0 commit comments

Comments
 (0)