Skip to content

Commit

Permalink
fix: if no fossa targets, set fossaAnalyze to N/A
Browse files Browse the repository at this point in the history
right now projects with no targets are left with the default fossaAnalyze value of 'error'
  • Loading branch information
elaguerta-nr committed May 23, 2024
1 parent f27e6f2 commit 0f2c45b
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions .github/workflows/fossa-default.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,16 @@ jobs:
-H "X-GitHub-Api-Version: 2022-11-28" \
https://api.github.com/orgs/$ORG/properties/values \
-d '{"repository_names":["'"${REPO##*/}"'"],"properties":[{"property_name":"fossaHasTargets","value":"'"${{ steps.fossa-list-targets.outputs.HAS_FOSSA_TARGETS }}"'"}]}'
- name: Set fossaAnalyzeResult custom property to N/A
if: ${{ steps.fossa-list-targets.outputs.HAS_FOSSA_TARGETS == 'False'}}
run: |
curl -L \
-X PATCH \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer $CUSTOM_PROPS_PAT" \
-H "X-GitHub-Api-Version: 2022-11-28" \
https://api.github.com/orgs/$ORG/properties/values \
-d '{"repository_names":["'"${REPO##*/}"'"],"properties":[{"property_name":"fossaAnalyzeResult","value":"N/A"}]}'
- id: fossa-analyze
name: Run fossa analyze
if: ${{ steps.fossa-list-targets.outputs.HAS_FOSSA_TARGETS == 'True'}}
Expand Down

0 comments on commit 0f2c45b

Please sign in to comment.