From 04b7e2cca0c3aba2f81fa204650f93f97eb54f66 Mon Sep 17 00:00:00 2001 From: Elaine Laguerta Date: Mon, 13 May 2024 15:45:26 -0700 Subject: [PATCH 1/2] chore: replace personal PAT with service PAT --- .github/workflows/fossa-caos.yml | 6 +++--- .github/workflows/fossa-default.yml | 6 +++--- .github/workflows/fossa-elixir.yml | 6 +++--- .github/workflows/fossa-gradle.yml | 6 +++--- .github/workflows/fossa-ruby-bundler.yml | 6 +++--- .github/workflows/fossa-scala.yml | 6 +++--- 6 files changed, 18 insertions(+), 18 deletions(-) diff --git a/.github/workflows/fossa-caos.yml b/.github/workflows/fossa-caos.yml index efcbdfe..84617ed 100644 --- a/.github/workflows/fossa-caos.yml +++ b/.github/workflows/fossa-caos.yml @@ -13,7 +13,7 @@ jobs: FOSSA_API_KEY: ${{secrets.FOSSA_API_KEY}} ORG: ${{ github.repository_owner }} REPO: ${{ github.repository }} - ORG_ADMIN_PAT: ${{ secrets.ELAGUERTA_PAT }} + CUSTOM_PROPS_PAT: ${{ secrets.FOSSA_PAT }} strategy: fail-fast: false @@ -52,7 +52,7 @@ jobs: curl -L \ -X PATCH \ -H "Accept: application/vnd.github+json" \ - -H "Authorization: Bearer $ORG_ADMIN_PAT" \ + -H "Authorization: Bearer $FOSSA_PAT" \ -H "X-GitHub-Api-Version: 2022-11-28" \ https://api.github.com/orgs/$ORG/properties/values \ -d '{"repository_names":["'"${REPO##*/}"'"],"properties":[{"property_name":"hasFossaTargets","value":"'"${{ steps.fossa-list-targets.outputs.HAS_FOSSA_TARGETS }}"'"}]}' @@ -77,7 +77,7 @@ jobs: curl -L \ -X PATCH \ -H "Accept: application/vnd.github+json" \ - -H "Authorization: Bearer $ORG_ADMIN_PAT" \ + -H "Authorization: Bearer $FOSSA_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":"'"${{ steps.fossa-analyze.outputs.FOSSA_ANALYZE_RESULT }}"'"}]}' diff --git a/.github/workflows/fossa-default.yml b/.github/workflows/fossa-default.yml index 0d89936..20e8bb6 100644 --- a/.github/workflows/fossa-default.yml +++ b/.github/workflows/fossa-default.yml @@ -13,7 +13,7 @@ jobs: FOSSA_API_KEY: ${{secrets.FOSSA_API_KEY}} ORG: ${{ github.repository_owner }} REPO: ${{ github.repository }} - ORG_ADMIN_PAT: ${{ secrets.ELAGUERTA_PAT }} + CUSTOM_PROPS_PAT: ${{ secrets.FOSSA_PAT }} strategy: fail-fast: false @@ -48,7 +48,7 @@ jobs: curl -L \ -X PATCH \ -H "Accept: application/vnd.github+json" \ - -H "Authorization: Bearer $ORG_ADMIN_PAT" \ + -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":"hasFossaTargets","value":"'"${{ steps.fossa-list-targets.outputs.HAS_FOSSA_TARGETS }}"'"}]}' @@ -73,7 +73,7 @@ jobs: curl -L \ -X PATCH \ -H "Accept: application/vnd.github+json" \ - -H "Authorization: Bearer $ORG_ADMIN_PAT" \ + -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":"'"${{ steps.fossa-analyze.outputs.FOSSA_ANALYZE_RESULT }}"'"}]}' diff --git a/.github/workflows/fossa-elixir.yml b/.github/workflows/fossa-elixir.yml index d72e58d..472081b 100644 --- a/.github/workflows/fossa-elixir.yml +++ b/.github/workflows/fossa-elixir.yml @@ -13,7 +13,7 @@ jobs: FOSSA_API_KEY: ${{secrets.FOSSA_API_KEY}} ORG: ${{ github.repository_owner }} REPO: ${{ github.repository }} - ORG_ADMIN_PAT: ${{ secrets.ELAGUERTA_PAT }} + CUSTOM_PROPS_PAT: ${{ secrets.FOSSA_PAT }} strategy: fail-fast: false @@ -52,7 +52,7 @@ jobs: curl -L \ -X PATCH \ -H "Accept: application/vnd.github+json" \ - -H "Authorization: Bearer $ORG_ADMIN_PAT" \ + -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":"hasFossaTargets","value":"'"${{ steps.fossa-list-targets.outputs.HAS_FOSSA_TARGETS }}"'"}]}' @@ -77,7 +77,7 @@ jobs: curl -L \ -X PATCH \ -H "Accept: application/vnd.github+json" \ - -H "Authorization: Bearer $ORG_ADMIN_PAT" \ + -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":"'"${{ steps.fossa-analyze.outputs.FOSSA_ANALYZE_RESULT }}"'"}]}' diff --git a/.github/workflows/fossa-gradle.yml b/.github/workflows/fossa-gradle.yml index e5eb3de..0d55ad4 100644 --- a/.github/workflows/fossa-gradle.yml +++ b/.github/workflows/fossa-gradle.yml @@ -13,7 +13,7 @@ jobs: FOSSA_API_KEY: ${{secrets.FOSSA_API_KEY}} ORG: ${{ github.repository_owner }} REPO: ${{ github.repository }} - ORG_ADMIN_PAT: ${{ secrets.ELAGUERTA_PAT }} + CUSTOM_PROPS_PAT: ${{ secrets.FOSSA_PAT }} strategy: fail-fast: false @@ -71,7 +71,7 @@ jobs: curl -L \ -X PATCH \ -H "Accept: application/vnd.github+json" \ - -H "Authorization: Bearer $ORG_ADMIN_PAT" \ + -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":"hasFossaTargets","value":"'"${{ steps.fossa-list-targets.outputs.HAS_FOSSA_TARGETS }}"'"}]}' @@ -96,7 +96,7 @@ jobs: curl -L \ -X PATCH \ -H "Accept: application/vnd.github+json" \ - -H "Authorization: Bearer $ORG_ADMIN_PAT" \ + -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":"'"${{ steps.fossa-analyze.outputs.FOSSA_ANALYZE_RESULT }}"'"}]}' diff --git a/.github/workflows/fossa-ruby-bundler.yml b/.github/workflows/fossa-ruby-bundler.yml index 780b003..ef14991 100644 --- a/.github/workflows/fossa-ruby-bundler.yml +++ b/.github/workflows/fossa-ruby-bundler.yml @@ -13,7 +13,7 @@ jobs: FOSSA_API_KEY: ${{secrets.FOSSA_API_KEY}} ORG: ${{ github.repository_owner }} REPO: ${{ github.repository }} - ORG_ADMIN_PAT: ${{ secrets.ELAGUERTA_PAT }} + CUSTOM_PROPS_PAT: ${{ secrets.FOSSA_PAT }} strategy: fail-fast: false @@ -51,7 +51,7 @@ jobs: curl -L \ -X PATCH \ -H "Accept: application/vnd.github+json" \ - -H "Authorization: Bearer $ORG_ADMIN_PAT" \ + -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":"hasFossaTargets","value":"'"${{ steps.fossa-list-targets.outputs.HAS_FOSSA_TARGETS }}"'"}]}' @@ -76,7 +76,7 @@ jobs: curl -L \ -X PATCH \ -H "Accept: application/vnd.github+json" \ - -H "Authorization: Bearer $ORG_ADMIN_PAT" \ + -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":"'"${{ steps.fossa-analyze.outputs.FOSSA_ANALYZE_RESULT }}"'"}]}' diff --git a/.github/workflows/fossa-scala.yml b/.github/workflows/fossa-scala.yml index 6651378..42f899f 100644 --- a/.github/workflows/fossa-scala.yml +++ b/.github/workflows/fossa-scala.yml @@ -13,7 +13,7 @@ jobs: FOSSA_API_KEY: ${{secrets.FOSSA_API_KEY}} ORG: ${{ github.repository_owner }} REPO: ${{ github.repository }} - ORG_ADMIN_PAT: ${{ secrets.ELAGUERTA_PAT }} + CUSTOM_PROPS_PAT: ${{ secrets.FOSSA_PAT }} strategy: fail-fast: false @@ -53,7 +53,7 @@ jobs: curl -L \ -X PATCH \ -H "Accept: application/vnd.github+json" \ - -H "Authorization: Bearer $ORG_ADMIN_PAT" \ + -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":"hasFossaTargets","value":"'"${{ steps.fossa-list-targets.outputs.HAS_FOSSA_TARGETS }}"'"}]}' @@ -78,7 +78,7 @@ jobs: curl -L \ -X PATCH \ -H "Accept: application/vnd.github+json" \ - -H "Authorization: Bearer $ORG_ADMIN_PAT" \ + -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":"'"${{ steps.fossa-analyze.outputs.FOSSA_ANALYZE_RESULT }}"'"}]}' From 73cf95f30edd9b2053590faa60f765fdd4c4c3e1 Mon Sep 17 00:00:00 2001 From: Elaine Laguerta Date: Tue, 14 May 2024 12:24:10 -0700 Subject: [PATCH 2/2] fix: correct env var name --- .github/workflows/fossa-caos.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/fossa-caos.yml b/.github/workflows/fossa-caos.yml index 84617ed..97e9fa9 100644 --- a/.github/workflows/fossa-caos.yml +++ b/.github/workflows/fossa-caos.yml @@ -52,7 +52,7 @@ jobs: curl -L \ -X PATCH \ -H "Accept: application/vnd.github+json" \ - -H "Authorization: Bearer $FOSSA_PAT" \ + -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":"hasFossaTargets","value":"'"${{ steps.fossa-list-targets.outputs.HAS_FOSSA_TARGETS }}"'"}]}' @@ -77,7 +77,7 @@ jobs: curl -L \ -X PATCH \ -H "Accept: application/vnd.github+json" \ - -H "Authorization: Bearer $FOSSA_PAT" \ + -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":"'"${{ steps.fossa-analyze.outputs.FOSSA_ANALYZE_RESULT }}"'"}]}'