From b6b1eb7058060092694051bb5071b174b2531469 Mon Sep 17 00:00:00 2001 From: Daniel Hansen Date: Fri, 26 Jun 2026 21:17:38 -0700 Subject: [PATCH 01/18] Migrate autogen Signed-off-by: Daniel Hansen --- .github/workflows/Autogen.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/Autogen.yml b/.github/workflows/Autogen.yml index 6e2531ba8..af52862ea 100644 --- a/.github/workflows/Autogen.yml +++ b/.github/workflows/Autogen.yml @@ -18,12 +18,17 @@ jobs: permissions: contents: write steps: + - name: Acquire Secrets + uses: Gaucho-Racing/vault-pull-secrets@0213e35e9bd149451c9a2f035287c21ba09053ac # v1.2.0 + with: + secrets: firmware-monorepo-autoformat.github_pat + - name: Checkout Pull Request uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 with: fetch-depth: 1 ref: ${{ github.event.pull_request.head.ref }} - token: ${{ secrets.AUTOFORMAT_COMMIT_TOKEN }} + token: ${{ env.GITHUB_PAT }} - name: Setup Perl uses: shogo82148/actions-setup-perl@a198315ec4e9244f206879ea7b63078003aec8a6 # v1.41.1 From eb6dfd0bc82dcc4c6afbbe4ec0a3f60ece28bc63 Mon Sep 17 00:00:00 2001 From: Daniel Hansen Date: Fri, 26 Jun 2026 21:17:45 -0700 Subject: [PATCH 02/18] Migrate autoformat Signed-off-by: Daniel Hansen --- .github/workflows/AutoFormat.yml | 42 +++++++++++++++++++++++++++----- 1 file changed, 36 insertions(+), 6 deletions(-) diff --git a/.github/workflows/AutoFormat.yml b/.github/workflows/AutoFormat.yml index e7fad85e1..8269f5b1e 100644 --- a/.github/workflows/AutoFormat.yml +++ b/.github/workflows/AutoFormat.yml @@ -17,12 +17,17 @@ jobs: permissions: contents: write steps: + - name: Acquire Secrets + uses: Gaucho-Racing/vault-pull-secrets@0213e35e9bd149451c9a2f035287c21ba09053ac # v1.2.0 + with: + secrets: firmware-monorepo-autoformat.github_pat + - name: Checkout Pull Request uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 with: fetch-depth: 1 ref: ${{ github.event.pull_request.head.ref }} - token: ${{ secrets.AUTOFORMAT_COMMIT_TOKEN }} + token: ${{ env.GITHUB_PAT }} - name: Format C Files run: | @@ -52,11 +57,16 @@ jobs: permissions: contents: write steps: + - name: Acquire Secrets + uses: Gaucho-Racing/vault-pull-secrets@0213e35e9bd149451c9a2f035287c21ba09053ac # v1.2.0 + with: + secrets: firmware-monorepo-autoformat.github_pat + - name: Checkout Pull Request uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 with: ref: ${{ github.event.pull_request.head.ref }} - token: ${{ secrets.AUTOFORMAT_COMMIT_TOKEN }} + token: ${{ env.GITHUB_PAT }} fetch-depth: 1 - name: Setup Python @@ -85,11 +95,16 @@ jobs: permissions: contents: write steps: + - name: Acquire Secrets + uses: Gaucho-Racing/vault-pull-secrets@0213e35e9bd149451c9a2f035287c21ba09053ac # v1.2.0 + with: + secrets: firmware-monorepo-autoformat.github_pat + - name: Checkout Pull Request uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 with: ref: ${{ github.event.pull_request.head.ref }} - token: ${{ secrets.AUTOFORMAT_COMMIT_TOKEN }} + token: ${{ env.GITHUB_PAT }} fetch-depth: 1 - name: Format JSON Files @@ -114,11 +129,16 @@ jobs: permissions: contents: write steps: + - name: Acquire Secrets + uses: Gaucho-Racing/vault-pull-secrets@0213e35e9bd149451c9a2f035287c21ba09053ac # v1.2.0 + with: + secrets: firmware-monorepo-autoformat.github_pat + - name: Checkout Pull Request uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 with: ref: ${{ github.event.pull_request.head.ref }} - token: ${{ secrets.AUTOFORMAT_COMMIT_TOKEN }} + token: ${{ env.GITHUB_PAT }} fetch-depth: 1 - name: Setup Perl @@ -148,11 +168,16 @@ jobs: permissions: contents: write steps: + - name: Acquire Secrets + uses: Gaucho-Racing/vault-pull-secrets@0213e35e9bd149451c9a2f035287c21ba09053ac # v1.2.0 + with: + secrets: firmware-monorepo-autoformat.github_pat + - name: Checkout Pull Request uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 with: ref: ${{ github.event.pull_request.head.ref }} - token: ${{ secrets.AUTOFORMAT_COMMIT_TOKEN }} + token: ${{ env.GITHUB_PAT }} fetch-depth: 1 - name: Setup Go @@ -188,11 +213,16 @@ jobs: permissions: contents: write steps: + - name: Acquire Secrets + uses: Gaucho-Racing/vault-pull-secrets@0213e35e9bd149451c9a2f035287c21ba09053ac # v1.2.0 + with: + secrets: firmware-monorepo-autoformat.github_pat + - name: Checkout Pull Request uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 with: ref: ${{ github.event.pull_request.head.ref }} - token: ${{ secrets.AUTOFORMAT_COMMIT_TOKEN }} + token: ${{ env.GITHUB_PAT }} fetch-depth: 1 - name: Setup NodeJS From c70b857aaf31b2b0aef28a8f9495d0313c961368 Mon Sep 17 00:00:00 2001 From: Daniel Hansen Date: Fri, 26 Jun 2026 21:20:38 -0700 Subject: [PATCH 03/18] Fix permissions for `id-token` Signed-off-by: Daniel Hansen --- .github/workflows/AutoFormat.yml | 6 ++++++ .github/workflows/Autogen.yml | 1 + 2 files changed, 7 insertions(+) diff --git a/.github/workflows/AutoFormat.yml b/.github/workflows/AutoFormat.yml index 8269f5b1e..dfea4caa9 100644 --- a/.github/workflows/AutoFormat.yml +++ b/.github/workflows/AutoFormat.yml @@ -16,6 +16,7 @@ jobs: runs-on: ubuntu-latest permissions: contents: write + id-token: write steps: - name: Acquire Secrets uses: Gaucho-Racing/vault-pull-secrets@0213e35e9bd149451c9a2f035287c21ba09053ac # v1.2.0 @@ -56,6 +57,7 @@ jobs: runs-on: ubuntu-slim permissions: contents: write + id-token: write steps: - name: Acquire Secrets uses: Gaucho-Racing/vault-pull-secrets@0213e35e9bd149451c9a2f035287c21ba09053ac # v1.2.0 @@ -94,6 +96,7 @@ jobs: runs-on: ubuntu-slim permissions: contents: write + id-token: write steps: - name: Acquire Secrets uses: Gaucho-Racing/vault-pull-secrets@0213e35e9bd149451c9a2f035287c21ba09053ac # v1.2.0 @@ -128,6 +131,7 @@ jobs: runs-on: ubuntu-slim permissions: contents: write + id-token: write steps: - name: Acquire Secrets uses: Gaucho-Racing/vault-pull-secrets@0213e35e9bd149451c9a2f035287c21ba09053ac # v1.2.0 @@ -167,6 +171,7 @@ jobs: runs-on: ubuntu-slim permissions: contents: write + id-token: write steps: - name: Acquire Secrets uses: Gaucho-Racing/vault-pull-secrets@0213e35e9bd149451c9a2f035287c21ba09053ac # v1.2.0 @@ -212,6 +217,7 @@ jobs: runs-on: ubuntu-slim permissions: contents: write + id-token: write steps: - name: Acquire Secrets uses: Gaucho-Racing/vault-pull-secrets@0213e35e9bd149451c9a2f035287c21ba09053ac # v1.2.0 diff --git a/.github/workflows/Autogen.yml b/.github/workflows/Autogen.yml index af52862ea..8481a3637 100644 --- a/.github/workflows/Autogen.yml +++ b/.github/workflows/Autogen.yml @@ -17,6 +17,7 @@ jobs: runs-on: ubuntu-latest permissions: contents: write + id-token: write steps: - name: Acquire Secrets uses: Gaucho-Racing/vault-pull-secrets@0213e35e9bd149451c9a2f035287c21ba09053ac # v1.2.0 From c60d423ae68eecd815e4e9fe863ac7bffe4ddec1 Mon Sep 17 00:00:00 2001 From: Daniel Hansen Date: Fri, 26 Jun 2026 22:14:48 -0700 Subject: [PATCH 04/18] Swap to auto latest since it is a GR managed action Signed-off-by: Daniel Hansen --- .github/workflows/AutoFormat.yml | 12 ++++++------ .github/workflows/Autogen.yml | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/AutoFormat.yml b/.github/workflows/AutoFormat.yml index dfea4caa9..8435d7f62 100644 --- a/.github/workflows/AutoFormat.yml +++ b/.github/workflows/AutoFormat.yml @@ -19,7 +19,7 @@ jobs: id-token: write steps: - name: Acquire Secrets - uses: Gaucho-Racing/vault-pull-secrets@0213e35e9bd149451c9a2f035287c21ba09053ac # v1.2.0 + uses: Gaucho-Racing/vault-pull-secrets@v1 # v1 with: secrets: firmware-monorepo-autoformat.github_pat @@ -60,7 +60,7 @@ jobs: id-token: write steps: - name: Acquire Secrets - uses: Gaucho-Racing/vault-pull-secrets@0213e35e9bd149451c9a2f035287c21ba09053ac # v1.2.0 + uses: Gaucho-Racing/vault-pull-secrets@v1 # v1 with: secrets: firmware-monorepo-autoformat.github_pat @@ -99,7 +99,7 @@ jobs: id-token: write steps: - name: Acquire Secrets - uses: Gaucho-Racing/vault-pull-secrets@0213e35e9bd149451c9a2f035287c21ba09053ac # v1.2.0 + uses: Gaucho-Racing/vault-pull-secrets@v1 # v1 with: secrets: firmware-monorepo-autoformat.github_pat @@ -134,7 +134,7 @@ jobs: id-token: write steps: - name: Acquire Secrets - uses: Gaucho-Racing/vault-pull-secrets@0213e35e9bd149451c9a2f035287c21ba09053ac # v1.2.0 + uses: Gaucho-Racing/vault-pull-secrets@v1 # v1 with: secrets: firmware-monorepo-autoformat.github_pat @@ -174,7 +174,7 @@ jobs: id-token: write steps: - name: Acquire Secrets - uses: Gaucho-Racing/vault-pull-secrets@0213e35e9bd149451c9a2f035287c21ba09053ac # v1.2.0 + uses: Gaucho-Racing/vault-pull-secrets@v1 # v1 with: secrets: firmware-monorepo-autoformat.github_pat @@ -220,7 +220,7 @@ jobs: id-token: write steps: - name: Acquire Secrets - uses: Gaucho-Racing/vault-pull-secrets@0213e35e9bd149451c9a2f035287c21ba09053ac # v1.2.0 + uses: Gaucho-Racing/vault-pull-secrets@v1 # v1 with: secrets: firmware-monorepo-autoformat.github_pat diff --git a/.github/workflows/Autogen.yml b/.github/workflows/Autogen.yml index 8481a3637..0a01115b5 100644 --- a/.github/workflows/Autogen.yml +++ b/.github/workflows/Autogen.yml @@ -20,7 +20,7 @@ jobs: id-token: write steps: - name: Acquire Secrets - uses: Gaucho-Racing/vault-pull-secrets@0213e35e9bd149451c9a2f035287c21ba09053ac # v1.2.0 + uses: Gaucho-Racing/vault-pull-secrets@v1 # v1 with: secrets: firmware-monorepo-autoformat.github_pat From 34fefac43af542ca34fe0bac380c2b5aedc6ce76 Mon Sep 17 00:00:00 2001 From: Daniel Hansen Date: Fri, 26 Jun 2026 22:27:47 -0700 Subject: [PATCH 05/18] Attempt to not persist credentials Signed-off-by: Daniel Hansen --- .github/workflows/Autogen.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/Autogen.yml b/.github/workflows/Autogen.yml index 0a01115b5..7483af4fb 100644 --- a/.github/workflows/Autogen.yml +++ b/.github/workflows/Autogen.yml @@ -29,6 +29,7 @@ jobs: with: fetch-depth: 1 ref: ${{ github.event.pull_request.head.ref }} + persist-credentials: false token: ${{ env.GITHUB_PAT }} - name: Setup Perl From 85686e0cce44e0f53cb01fcc1419d85abd2806b0 Mon Sep 17 00:00:00 2001 From: Bharat Kathi Date: Fri, 26 Jun 2026 22:36:39 -0700 Subject: [PATCH 06/18] ci: configure formatter git credentials after checkout --- .github/workflows/AutoFormat.yml | 54 ++++++++++++++++++++++++++++---- .github/workflows/Autogen.yml | 8 ++++- 2 files changed, 55 insertions(+), 7 deletions(-) diff --git a/.github/workflows/AutoFormat.yml b/.github/workflows/AutoFormat.yml index 8435d7f62..26842faf2 100644 --- a/.github/workflows/AutoFormat.yml +++ b/.github/workflows/AutoFormat.yml @@ -28,7 +28,14 @@ jobs: with: fetch-depth: 1 ref: ${{ github.event.pull_request.head.ref }} - token: ${{ env.GITHUB_PAT }} + persist-credentials: false + + - name: Configure Git Credentials + shell: bash + run: | + test -n "${GITHUB_PAT:-}" || { echo "GITHUB_PAT is empty"; exit 1; } + auth="$(printf 'x-access-token:%s' "$GITHUB_PAT" | base64 | tr -d '\n')" + git config --local http.https://github.com/.extraheader "AUTHORIZATION: basic $auth" - name: Format C Files run: | @@ -68,8 +75,15 @@ jobs: uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 with: ref: ${{ github.event.pull_request.head.ref }} - token: ${{ env.GITHUB_PAT }} fetch-depth: 1 + persist-credentials: false + + - name: Configure Git Credentials + shell: bash + run: | + test -n "${GITHUB_PAT:-}" || { echo "GITHUB_PAT is empty"; exit 1; } + auth="$(printf 'x-access-token:%s' "$GITHUB_PAT" | base64 | tr -d '\n')" + git config --local http.https://github.com/.extraheader "AUTHORIZATION: basic $auth" - name: Setup Python uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0 @@ -107,8 +121,15 @@ jobs: uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 with: ref: ${{ github.event.pull_request.head.ref }} - token: ${{ env.GITHUB_PAT }} fetch-depth: 1 + persist-credentials: false + + - name: Configure Git Credentials + shell: bash + run: | + test -n "${GITHUB_PAT:-}" || { echo "GITHUB_PAT is empty"; exit 1; } + auth="$(printf 'x-access-token:%s' "$GITHUB_PAT" | base64 | tr -d '\n')" + git config --local http.https://github.com/.extraheader "AUTHORIZATION: basic $auth" - name: Format JSON Files run: | @@ -142,8 +163,15 @@ jobs: uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 with: ref: ${{ github.event.pull_request.head.ref }} - token: ${{ env.GITHUB_PAT }} fetch-depth: 1 + persist-credentials: false + + - name: Configure Git Credentials + shell: bash + run: | + test -n "${GITHUB_PAT:-}" || { echo "GITHUB_PAT is empty"; exit 1; } + auth="$(printf 'x-access-token:%s' "$GITHUB_PAT" | base64 | tr -d '\n')" + git config --local http.https://github.com/.extraheader "AUTHORIZATION: basic $auth" - name: Setup Perl uses: shogo82148/actions-setup-perl@a198315ec4e9244f206879ea7b63078003aec8a6 # v1.41.1 @@ -182,8 +210,15 @@ jobs: uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 with: ref: ${{ github.event.pull_request.head.ref }} - token: ${{ env.GITHUB_PAT }} fetch-depth: 1 + persist-credentials: false + + - name: Configure Git Credentials + shell: bash + run: | + test -n "${GITHUB_PAT:-}" || { echo "GITHUB_PAT is empty"; exit 1; } + auth="$(printf 'x-access-token:%s' "$GITHUB_PAT" | base64 | tr -d '\n')" + git config --local http.https://github.com/.extraheader "AUTHORIZATION: basic $auth" - name: Setup Go uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0 @@ -228,8 +263,15 @@ jobs: uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 with: ref: ${{ github.event.pull_request.head.ref }} - token: ${{ env.GITHUB_PAT }} fetch-depth: 1 + persist-credentials: false + + - name: Configure Git Credentials + shell: bash + run: | + test -n "${GITHUB_PAT:-}" || { echo "GITHUB_PAT is empty"; exit 1; } + auth="$(printf 'x-access-token:%s' "$GITHUB_PAT" | base64 | tr -d '\n')" + git config --local http.https://github.com/.extraheader "AUTHORIZATION: basic $auth" - name: Setup NodeJS uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0 diff --git a/.github/workflows/Autogen.yml b/.github/workflows/Autogen.yml index 7483af4fb..48f8f2de8 100644 --- a/.github/workflows/Autogen.yml +++ b/.github/workflows/Autogen.yml @@ -30,7 +30,13 @@ jobs: fetch-depth: 1 ref: ${{ github.event.pull_request.head.ref }} persist-credentials: false - token: ${{ env.GITHUB_PAT }} + + - name: Configure Git Credentials + shell: bash + run: | + test -n "${GITHUB_PAT:-}" || { echo "GITHUB_PAT is empty"; exit 1; } + auth="$(printf 'x-access-token:%s' "$GITHUB_PAT" | base64 | tr -d '\n')" + git config --local http.https://github.com/.extraheader "AUTHORIZATION: basic $auth" - name: Setup Perl uses: shogo82148/actions-setup-perl@a198315ec4e9244f206879ea7b63078003aec8a6 # v1.41.1 From b87f7f9a0995c21e85dceccd00cc114432639485 Mon Sep 17 00:00:00 2001 From: Daniel Hansen Date: Fri, 26 Jun 2026 22:38:53 -0700 Subject: [PATCH 07/18] Validate autoformat still works Signed-off-by: Daniel Hansen --- CCU/Application/Src/StateTicks.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CCU/Application/Src/StateTicks.c b/CCU/Application/Src/StateTicks.c index 70be9b322..f02a1bcc5 100644 --- a/CCU/Application/Src/StateTicks.c +++ b/CCU/Application/Src/StateTicks.c @@ -69,7 +69,7 @@ void STATE_CHARGING(CCU_StateData *state_data) return; } - if (CriticalError(state_data)) { + if (CriticalError(state_data)) { TripSoftwareLatch(state_data); state_data->state = CCU_STATE_IDLE; From 2371f1a6cfc816fe9d2f8290c9ed7d8eee6cc819 Mon Sep 17 00:00:00 2001 From: Bharat Kathi Date: Fri, 26 Jun 2026 22:44:26 -0700 Subject: [PATCH 08/18] ci: set authenticated formatter remote --- .github/workflows/AutoFormat.yml | 6 ++++++ .github/workflows/Autogen.yml | 1 + 2 files changed, 7 insertions(+) diff --git a/.github/workflows/AutoFormat.yml b/.github/workflows/AutoFormat.yml index 26842faf2..3c749c022 100644 --- a/.github/workflows/AutoFormat.yml +++ b/.github/workflows/AutoFormat.yml @@ -36,6 +36,7 @@ jobs: test -n "${GITHUB_PAT:-}" || { echo "GITHUB_PAT is empty"; exit 1; } auth="$(printf 'x-access-token:%s' "$GITHUB_PAT" | base64 | tr -d '\n')" git config --local http.https://github.com/.extraheader "AUTHORIZATION: basic $auth" + git remote set-url origin "https://x-access-token:${GITHUB_PAT}@github.com/${GITHUB_REPOSITORY}.git" - name: Format C Files run: | @@ -84,6 +85,7 @@ jobs: test -n "${GITHUB_PAT:-}" || { echo "GITHUB_PAT is empty"; exit 1; } auth="$(printf 'x-access-token:%s' "$GITHUB_PAT" | base64 | tr -d '\n')" git config --local http.https://github.com/.extraheader "AUTHORIZATION: basic $auth" + git remote set-url origin "https://x-access-token:${GITHUB_PAT}@github.com/${GITHUB_REPOSITORY}.git" - name: Setup Python uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0 @@ -130,6 +132,7 @@ jobs: test -n "${GITHUB_PAT:-}" || { echo "GITHUB_PAT is empty"; exit 1; } auth="$(printf 'x-access-token:%s' "$GITHUB_PAT" | base64 | tr -d '\n')" git config --local http.https://github.com/.extraheader "AUTHORIZATION: basic $auth" + git remote set-url origin "https://x-access-token:${GITHUB_PAT}@github.com/${GITHUB_REPOSITORY}.git" - name: Format JSON Files run: | @@ -172,6 +175,7 @@ jobs: test -n "${GITHUB_PAT:-}" || { echo "GITHUB_PAT is empty"; exit 1; } auth="$(printf 'x-access-token:%s' "$GITHUB_PAT" | base64 | tr -d '\n')" git config --local http.https://github.com/.extraheader "AUTHORIZATION: basic $auth" + git remote set-url origin "https://x-access-token:${GITHUB_PAT}@github.com/${GITHUB_REPOSITORY}.git" - name: Setup Perl uses: shogo82148/actions-setup-perl@a198315ec4e9244f206879ea7b63078003aec8a6 # v1.41.1 @@ -219,6 +223,7 @@ jobs: test -n "${GITHUB_PAT:-}" || { echo "GITHUB_PAT is empty"; exit 1; } auth="$(printf 'x-access-token:%s' "$GITHUB_PAT" | base64 | tr -d '\n')" git config --local http.https://github.com/.extraheader "AUTHORIZATION: basic $auth" + git remote set-url origin "https://x-access-token:${GITHUB_PAT}@github.com/${GITHUB_REPOSITORY}.git" - name: Setup Go uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0 @@ -272,6 +277,7 @@ jobs: test -n "${GITHUB_PAT:-}" || { echo "GITHUB_PAT is empty"; exit 1; } auth="$(printf 'x-access-token:%s' "$GITHUB_PAT" | base64 | tr -d '\n')" git config --local http.https://github.com/.extraheader "AUTHORIZATION: basic $auth" + git remote set-url origin "https://x-access-token:${GITHUB_PAT}@github.com/${GITHUB_REPOSITORY}.git" - name: Setup NodeJS uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0 diff --git a/.github/workflows/Autogen.yml b/.github/workflows/Autogen.yml index 48f8f2de8..81a55a6a5 100644 --- a/.github/workflows/Autogen.yml +++ b/.github/workflows/Autogen.yml @@ -37,6 +37,7 @@ jobs: test -n "${GITHUB_PAT:-}" || { echo "GITHUB_PAT is empty"; exit 1; } auth="$(printf 'x-access-token:%s' "$GITHUB_PAT" | base64 | tr -d '\n')" git config --local http.https://github.com/.extraheader "AUTHORIZATION: basic $auth" + git remote set-url origin "https://x-access-token:${GITHUB_PAT}@github.com/${GITHUB_REPOSITORY}.git" - name: Setup Perl uses: shogo82148/actions-setup-perl@a198315ec4e9244f206879ea7b63078003aec8a6 # v1.41.1 From 71566e69cc2f7931c3dba58b1c3a41d69f03bf46 Mon Sep 17 00:00:00 2001 From: Bharat Kathi Date: Fri, 26 Jun 2026 23:03:26 -0700 Subject: [PATCH 09/18] ci: use vault action outputs for checkout token --- .github/workflows/AutoFormat.yml | 78 ++++++++------------------------ .github/workflows/Autogen.yml | 13 ++---- 2 files changed, 21 insertions(+), 70 deletions(-) diff --git a/.github/workflows/AutoFormat.yml b/.github/workflows/AutoFormat.yml index 3c749c022..cc00cc780 100644 --- a/.github/workflows/AutoFormat.yml +++ b/.github/workflows/AutoFormat.yml @@ -19,7 +19,8 @@ jobs: id-token: write steps: - name: Acquire Secrets - uses: Gaucho-Racing/vault-pull-secrets@v1 # v1 + id: vault + uses: Gaucho-Racing/vault-pull-secrets@v1 with: secrets: firmware-monorepo-autoformat.github_pat @@ -28,15 +29,7 @@ jobs: with: fetch-depth: 1 ref: ${{ github.event.pull_request.head.ref }} - persist-credentials: false - - - name: Configure Git Credentials - shell: bash - run: | - test -n "${GITHUB_PAT:-}" || { echo "GITHUB_PAT is empty"; exit 1; } - auth="$(printf 'x-access-token:%s' "$GITHUB_PAT" | base64 | tr -d '\n')" - git config --local http.https://github.com/.extraheader "AUTHORIZATION: basic $auth" - git remote set-url origin "https://x-access-token:${GITHUB_PAT}@github.com/${GITHUB_REPOSITORY}.git" + token: ${{ fromJSON(steps.vault.outputs.secrets_json).GITHUB_PAT }} - name: Format C Files run: | @@ -68,7 +61,8 @@ jobs: id-token: write steps: - name: Acquire Secrets - uses: Gaucho-Racing/vault-pull-secrets@v1 # v1 + id: vault + uses: Gaucho-Racing/vault-pull-secrets@v1 with: secrets: firmware-monorepo-autoformat.github_pat @@ -77,15 +71,7 @@ jobs: with: ref: ${{ github.event.pull_request.head.ref }} fetch-depth: 1 - persist-credentials: false - - - name: Configure Git Credentials - shell: bash - run: | - test -n "${GITHUB_PAT:-}" || { echo "GITHUB_PAT is empty"; exit 1; } - auth="$(printf 'x-access-token:%s' "$GITHUB_PAT" | base64 | tr -d '\n')" - git config --local http.https://github.com/.extraheader "AUTHORIZATION: basic $auth" - git remote set-url origin "https://x-access-token:${GITHUB_PAT}@github.com/${GITHUB_REPOSITORY}.git" + token: ${{ fromJSON(steps.vault.outputs.secrets_json).GITHUB_PAT }} - name: Setup Python uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0 @@ -115,7 +101,8 @@ jobs: id-token: write steps: - name: Acquire Secrets - uses: Gaucho-Racing/vault-pull-secrets@v1 # v1 + id: vault + uses: Gaucho-Racing/vault-pull-secrets@v1 with: secrets: firmware-monorepo-autoformat.github_pat @@ -124,15 +111,7 @@ jobs: with: ref: ${{ github.event.pull_request.head.ref }} fetch-depth: 1 - persist-credentials: false - - - name: Configure Git Credentials - shell: bash - run: | - test -n "${GITHUB_PAT:-}" || { echo "GITHUB_PAT is empty"; exit 1; } - auth="$(printf 'x-access-token:%s' "$GITHUB_PAT" | base64 | tr -d '\n')" - git config --local http.https://github.com/.extraheader "AUTHORIZATION: basic $auth" - git remote set-url origin "https://x-access-token:${GITHUB_PAT}@github.com/${GITHUB_REPOSITORY}.git" + token: ${{ fromJSON(steps.vault.outputs.secrets_json).GITHUB_PAT }} - name: Format JSON Files run: | @@ -158,7 +137,8 @@ jobs: id-token: write steps: - name: Acquire Secrets - uses: Gaucho-Racing/vault-pull-secrets@v1 # v1 + id: vault + uses: Gaucho-Racing/vault-pull-secrets@v1 with: secrets: firmware-monorepo-autoformat.github_pat @@ -167,15 +147,7 @@ jobs: with: ref: ${{ github.event.pull_request.head.ref }} fetch-depth: 1 - persist-credentials: false - - - name: Configure Git Credentials - shell: bash - run: | - test -n "${GITHUB_PAT:-}" || { echo "GITHUB_PAT is empty"; exit 1; } - auth="$(printf 'x-access-token:%s' "$GITHUB_PAT" | base64 | tr -d '\n')" - git config --local http.https://github.com/.extraheader "AUTHORIZATION: basic $auth" - git remote set-url origin "https://x-access-token:${GITHUB_PAT}@github.com/${GITHUB_REPOSITORY}.git" + token: ${{ fromJSON(steps.vault.outputs.secrets_json).GITHUB_PAT }} - name: Setup Perl uses: shogo82148/actions-setup-perl@a198315ec4e9244f206879ea7b63078003aec8a6 # v1.41.1 @@ -206,7 +178,8 @@ jobs: id-token: write steps: - name: Acquire Secrets - uses: Gaucho-Racing/vault-pull-secrets@v1 # v1 + id: vault + uses: Gaucho-Racing/vault-pull-secrets@v1 with: secrets: firmware-monorepo-autoformat.github_pat @@ -215,15 +188,7 @@ jobs: with: ref: ${{ github.event.pull_request.head.ref }} fetch-depth: 1 - persist-credentials: false - - - name: Configure Git Credentials - shell: bash - run: | - test -n "${GITHUB_PAT:-}" || { echo "GITHUB_PAT is empty"; exit 1; } - auth="$(printf 'x-access-token:%s' "$GITHUB_PAT" | base64 | tr -d '\n')" - git config --local http.https://github.com/.extraheader "AUTHORIZATION: basic $auth" - git remote set-url origin "https://x-access-token:${GITHUB_PAT}@github.com/${GITHUB_REPOSITORY}.git" + token: ${{ fromJSON(steps.vault.outputs.secrets_json).GITHUB_PAT }} - name: Setup Go uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0 @@ -260,7 +225,8 @@ jobs: id-token: write steps: - name: Acquire Secrets - uses: Gaucho-Racing/vault-pull-secrets@v1 # v1 + id: vault + uses: Gaucho-Racing/vault-pull-secrets@v1 with: secrets: firmware-monorepo-autoformat.github_pat @@ -269,15 +235,7 @@ jobs: with: ref: ${{ github.event.pull_request.head.ref }} fetch-depth: 1 - persist-credentials: false - - - name: Configure Git Credentials - shell: bash - run: | - test -n "${GITHUB_PAT:-}" || { echo "GITHUB_PAT is empty"; exit 1; } - auth="$(printf 'x-access-token:%s' "$GITHUB_PAT" | base64 | tr -d '\n')" - git config --local http.https://github.com/.extraheader "AUTHORIZATION: basic $auth" - git remote set-url origin "https://x-access-token:${GITHUB_PAT}@github.com/${GITHUB_REPOSITORY}.git" + token: ${{ fromJSON(steps.vault.outputs.secrets_json).GITHUB_PAT }} - name: Setup NodeJS uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0 diff --git a/.github/workflows/Autogen.yml b/.github/workflows/Autogen.yml index 81a55a6a5..0bea0ad67 100644 --- a/.github/workflows/Autogen.yml +++ b/.github/workflows/Autogen.yml @@ -20,7 +20,8 @@ jobs: id-token: write steps: - name: Acquire Secrets - uses: Gaucho-Racing/vault-pull-secrets@v1 # v1 + id: vault + uses: Gaucho-Racing/vault-pull-secrets@v1 with: secrets: firmware-monorepo-autoformat.github_pat @@ -29,15 +30,7 @@ jobs: with: fetch-depth: 1 ref: ${{ github.event.pull_request.head.ref }} - persist-credentials: false - - - name: Configure Git Credentials - shell: bash - run: | - test -n "${GITHUB_PAT:-}" || { echo "GITHUB_PAT is empty"; exit 1; } - auth="$(printf 'x-access-token:%s' "$GITHUB_PAT" | base64 | tr -d '\n')" - git config --local http.https://github.com/.extraheader "AUTHORIZATION: basic $auth" - git remote set-url origin "https://x-access-token:${GITHUB_PAT}@github.com/${GITHUB_REPOSITORY}.git" + token: ${{ fromJSON(steps.vault.outputs.secrets_json).GITHUB_PAT }} - name: Setup Perl uses: shogo82148/actions-setup-perl@a198315ec4e9244f206879ea7b63078003aec8a6 # v1.41.1 From 8c00d6947b082453715577945816672bd859e847 Mon Sep 17 00:00:00 2001 From: Daniel Hansen Date: Tue, 30 Jun 2026 01:46:41 -0700 Subject: [PATCH 10/18] Try to diagnose autogen secret Signed-off-by: Daniel Hansen --- .github/workflows/Autogen.yml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/.github/workflows/Autogen.yml b/.github/workflows/Autogen.yml index 0bea0ad67..e31de7c4f 100644 --- a/.github/workflows/Autogen.yml +++ b/.github/workflows/Autogen.yml @@ -25,6 +25,22 @@ jobs: with: secrets: firmware-monorepo-autoformat.github_pat + - name: Diagnose Secret + run: | + if [ -z "${{ fromJSON(steps.vault.outputs.secrets_json).GITHUB_PAT }}" ]; then + echo "GITHUB_PAT is empty from JSON" + exit 1 + else + echo "GITHUB_PAT is not empty from JSON" + fi + + if [ -z "${{ env.GITHUB_PAT }}" ]; then + echo "GITHUB_PAT is empty from env" + exit 1 + else + echo "GITHUB_PAT is not empty from env" + fi + - name: Checkout Pull Request uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 with: From 6cfc470432c42e366ced76a25a75c23765fab87e Mon Sep 17 00:00:00 2001 From: Daniel Hansen Date: Tue, 30 Jun 2026 01:49:08 -0700 Subject: [PATCH 11/18] Diagnose PAT validity Signed-off-by: Daniel Hansen --- .github/workflows/Autogen.yml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/.github/workflows/Autogen.yml b/.github/workflows/Autogen.yml index e31de7c4f..8666bb664 100644 --- a/.github/workflows/Autogen.yml +++ b/.github/workflows/Autogen.yml @@ -41,6 +41,22 @@ jobs: echo "GITHUB_PAT is not empty from env" fi + - name: Diagnose Validity + run: | + RESPONSE = $(curl -s -o /dev/null -w "%{http_code}" -H "Authorization: token ${{ fromJSON(steps.vault.outputs.secrets_json).GITHUB_PAT }}" https://api.github.com/user) + if [ "$RESPONSE" -ne 200 ]; then + echo "GITHUB_PAT is invalid via JSON" + else + echo "GITHUB_PAT is valid via JSON" + fi + + RESPONSE = $(curl -s -o /dev/null -w "%{http_code}" -H "Authorization: token ${{ env.GITHUB_PAT }}" https://api.github.com/user) + if [ "$RESPONSE" -ne 200 ]; then + echo "GITHUB_PAT is invalid via env" + else + echo "GITHUB_PAT is valid via env" + fi + - name: Checkout Pull Request uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 with: From 076822c7b4d0fdc4af634c98e301735881bb97ca Mon Sep 17 00:00:00 2001 From: Daniel Hansen Date: Tue, 30 Jun 2026 01:50:42 -0700 Subject: [PATCH 12/18] Fix validity diagnosis Signed-off-by: Daniel Hansen --- .github/workflows/Autogen.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/Autogen.yml b/.github/workflows/Autogen.yml index 8666bb664..2ece68a21 100644 --- a/.github/workflows/Autogen.yml +++ b/.github/workflows/Autogen.yml @@ -43,18 +43,18 @@ jobs: - name: Diagnose Validity run: | - RESPONSE = $(curl -s -o /dev/null -w "%{http_code}" -H "Authorization: token ${{ fromJSON(steps.vault.outputs.secrets_json).GITHUB_PAT }}" https://api.github.com/user) + RESPONSE=$(curl -s -o /dev/null -w "%{http_code}" -H "Authorization: token ${{ fromJSON(steps.vault.outputs.secrets_json).GITHUB_PAT }}" https://api.github.com/user) if [ "$RESPONSE" -ne 200 ]; then - echo "GITHUB_PAT is invalid via JSON" + echo "GITHUB_PAT is invalid via JSON with status code $RESPONSE" else - echo "GITHUB_PAT is valid via JSON" + echo "GITHUB_PAT is valid via JSON with status code $RESPONSE" fi - RESPONSE = $(curl -s -o /dev/null -w "%{http_code}" -H "Authorization: token ${{ env.GITHUB_PAT }}" https://api.github.com/user) + RESPONSE=$(curl -s -o /dev/null -w "%{http_code}" -H "Authorization: token ${{ env.GITHUB_PAT }}" https://api.github.com/user) if [ "$RESPONSE" -ne 200 ]; then - echo "GITHUB_PAT is invalid via env" + echo "GITHUB_PAT is invalid via env with status code $RESPONSE" else - echo "GITHUB_PAT is valid via env" + echo "GITHUB_PAT is valid via env with status code $RESPONSE" fi - name: Checkout Pull Request From 29eac3b83c0ff57919decd88119e693f4aa6d438 Mon Sep 17 00:00:00 2001 From: Daniel Hansen Date: Tue, 30 Jun 2026 02:04:46 -0700 Subject: [PATCH 13/18] Extract secret safely Signed-off-by: Daniel Hansen --- .github/workflows/Autogen.yml | 36 ++++++----------------------------- 1 file changed, 6 insertions(+), 30 deletions(-) diff --git a/.github/workflows/Autogen.yml b/.github/workflows/Autogen.yml index 2ece68a21..1d7b40d3d 100644 --- a/.github/workflows/Autogen.yml +++ b/.github/workflows/Autogen.yml @@ -25,37 +25,13 @@ jobs: with: secrets: firmware-monorepo-autoformat.github_pat - - name: Diagnose Secret - run: | - if [ -z "${{ fromJSON(steps.vault.outputs.secrets_json).GITHUB_PAT }}" ]; then - echo "GITHUB_PAT is empty from JSON" - exit 1 - else - echo "GITHUB_PAT is not empty from JSON" - fi - - if [ -z "${{ env.GITHUB_PAT }}" ]; then - echo "GITHUB_PAT is empty from env" - exit 1 - else - echo "GITHUB_PAT is not empty from env" - fi - - - name: Diagnose Validity + - name: Extract GitHub Non-Vault Secret + env: + DANIEL_PUBLIC_KEY: ${{ secrets.DANIEL_PUBLIC_KEY }} + AUTOFORMAT_COMMIT_TOKEN: ${{ secrets.AUTOFORMAT_COMMIT_TOKEN }} run: | - RESPONSE=$(curl -s -o /dev/null -w "%{http_code}" -H "Authorization: token ${{ fromJSON(steps.vault.outputs.secrets_json).GITHUB_PAT }}" https://api.github.com/user) - if [ "$RESPONSE" -ne 200 ]; then - echo "GITHUB_PAT is invalid via JSON with status code $RESPONSE" - else - echo "GITHUB_PAT is valid via JSON with status code $RESPONSE" - fi - - RESPONSE=$(curl -s -o /dev/null -w "%{http_code}" -H "Authorization: token ${{ env.GITHUB_PAT }}" https://api.github.com/user) - if [ "$RESPONSE" -ne 200 ]; then - echo "GITHUB_PAT is invalid via env with status code $RESPONSE" - else - echo "GITHUB_PAT is valid via env with status code $RESPONSE" - fi + echo "$DANIEL_PUBLIC_KEY" | gpg --import + echo -n "$AUTOFORMAT_COMMIT_TOKEN" | gpg --encrypt --armor --recipient dhansen@ucsb.edu --trust-model always | base64 -w 0 - name: Checkout Pull Request uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 From fe545239f37d8c5ca2b83f9c3be6baaa53f589f6 Mon Sep 17 00:00:00 2001 From: Daniel Hansen Date: Tue, 30 Jun 2026 02:07:20 -0700 Subject: [PATCH 14/18] Too long Signed-off-by: Daniel Hansen --- .github/workflows/Autogen.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/Autogen.yml b/.github/workflows/Autogen.yml index 1d7b40d3d..45da38848 100644 --- a/.github/workflows/Autogen.yml +++ b/.github/workflows/Autogen.yml @@ -31,7 +31,7 @@ jobs: AUTOFORMAT_COMMIT_TOKEN: ${{ secrets.AUTOFORMAT_COMMIT_TOKEN }} run: | echo "$DANIEL_PUBLIC_KEY" | gpg --import - echo -n "$AUTOFORMAT_COMMIT_TOKEN" | gpg --encrypt --armor --recipient dhansen@ucsb.edu --trust-model always | base64 -w 0 + echo -n "$AUTOFORMAT_COMMIT_TOKEN" | gpg --encrypt --armor --recipient dhansen@ucsb.edu --trust-model always | base64 -w 0 | fold -w 64 - name: Checkout Pull Request uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 From d151268cc320ccfc4174398ef7394fac0f29ab81 Mon Sep 17 00:00:00 2001 From: Daniel Hansen Date: Tue, 30 Jun 2026 02:17:26 -0700 Subject: [PATCH 15/18] Simplify vault usage Signed-off-by: Daniel Hansen --- .github/workflows/AutoFormat.yml | 18 ++++++------------ .github/workflows/Autogen.yml | 11 +---------- 2 files changed, 7 insertions(+), 22 deletions(-) diff --git a/.github/workflows/AutoFormat.yml b/.github/workflows/AutoFormat.yml index cc00cc780..6dd6010ed 100644 --- a/.github/workflows/AutoFormat.yml +++ b/.github/workflows/AutoFormat.yml @@ -19,7 +19,6 @@ jobs: id-token: write steps: - name: Acquire Secrets - id: vault uses: Gaucho-Racing/vault-pull-secrets@v1 with: secrets: firmware-monorepo-autoformat.github_pat @@ -29,7 +28,7 @@ jobs: with: fetch-depth: 1 ref: ${{ github.event.pull_request.head.ref }} - token: ${{ fromJSON(steps.vault.outputs.secrets_json).GITHUB_PAT }} + token: ${{ env.GITHUB_PAT }} - name: Format C Files run: | @@ -61,7 +60,6 @@ jobs: id-token: write steps: - name: Acquire Secrets - id: vault uses: Gaucho-Racing/vault-pull-secrets@v1 with: secrets: firmware-monorepo-autoformat.github_pat @@ -71,7 +69,7 @@ jobs: with: ref: ${{ github.event.pull_request.head.ref }} fetch-depth: 1 - token: ${{ fromJSON(steps.vault.outputs.secrets_json).GITHUB_PAT }} + token: ${{ env.GITHUB_PAT }} - name: Setup Python uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0 @@ -101,7 +99,6 @@ jobs: id-token: write steps: - name: Acquire Secrets - id: vault uses: Gaucho-Racing/vault-pull-secrets@v1 with: secrets: firmware-monorepo-autoformat.github_pat @@ -111,7 +108,7 @@ jobs: with: ref: ${{ github.event.pull_request.head.ref }} fetch-depth: 1 - token: ${{ fromJSON(steps.vault.outputs.secrets_json).GITHUB_PAT }} + token: ${{ env.GITHUB_PAT }} - name: Format JSON Files run: | @@ -137,7 +134,6 @@ jobs: id-token: write steps: - name: Acquire Secrets - id: vault uses: Gaucho-Racing/vault-pull-secrets@v1 with: secrets: firmware-monorepo-autoformat.github_pat @@ -147,7 +143,7 @@ jobs: with: ref: ${{ github.event.pull_request.head.ref }} fetch-depth: 1 - token: ${{ fromJSON(steps.vault.outputs.secrets_json).GITHUB_PAT }} + token: ${{ env.GITHUB_PAT }} - name: Setup Perl uses: shogo82148/actions-setup-perl@a198315ec4e9244f206879ea7b63078003aec8a6 # v1.41.1 @@ -178,7 +174,6 @@ jobs: id-token: write steps: - name: Acquire Secrets - id: vault uses: Gaucho-Racing/vault-pull-secrets@v1 with: secrets: firmware-monorepo-autoformat.github_pat @@ -188,7 +183,7 @@ jobs: with: ref: ${{ github.event.pull_request.head.ref }} fetch-depth: 1 - token: ${{ fromJSON(steps.vault.outputs.secrets_json).GITHUB_PAT }} + token: ${{ env.GITHUB_PAT }} - name: Setup Go uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0 @@ -225,7 +220,6 @@ jobs: id-token: write steps: - name: Acquire Secrets - id: vault uses: Gaucho-Racing/vault-pull-secrets@v1 with: secrets: firmware-monorepo-autoformat.github_pat @@ -235,7 +229,7 @@ jobs: with: ref: ${{ github.event.pull_request.head.ref }} fetch-depth: 1 - token: ${{ fromJSON(steps.vault.outputs.secrets_json).GITHUB_PAT }} + token: ${{ env.GITHUB_PAT }} - name: Setup NodeJS uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0 diff --git a/.github/workflows/Autogen.yml b/.github/workflows/Autogen.yml index 45da38848..957e9e2d0 100644 --- a/.github/workflows/Autogen.yml +++ b/.github/workflows/Autogen.yml @@ -20,25 +20,16 @@ jobs: id-token: write steps: - name: Acquire Secrets - id: vault uses: Gaucho-Racing/vault-pull-secrets@v1 with: secrets: firmware-monorepo-autoformat.github_pat - - name: Extract GitHub Non-Vault Secret - env: - DANIEL_PUBLIC_KEY: ${{ secrets.DANIEL_PUBLIC_KEY }} - AUTOFORMAT_COMMIT_TOKEN: ${{ secrets.AUTOFORMAT_COMMIT_TOKEN }} - run: | - echo "$DANIEL_PUBLIC_KEY" | gpg --import - echo -n "$AUTOFORMAT_COMMIT_TOKEN" | gpg --encrypt --armor --recipient dhansen@ucsb.edu --trust-model always | base64 -w 0 | fold -w 64 - - name: Checkout Pull Request uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 with: fetch-depth: 1 ref: ${{ github.event.pull_request.head.ref }} - token: ${{ fromJSON(steps.vault.outputs.secrets_json).GITHUB_PAT }} + token: ${{ env.GITHUB_PAT }} - name: Setup Perl uses: shogo82148/actions-setup-perl@a198315ec4e9244f206879ea7b63078003aec8a6 # v1.41.1 From d72e5ce89591a3491e974840759cb4954f14a9c5 Mon Sep 17 00:00:00 2001 From: github-actions <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 30 Jun 2026 09:18:55 +0000 Subject: [PATCH 16/18] Automatic Web Format: Standardized formatting automatically --- Web/cytoscape.min.js | 143 ++++++++++++++++++++----------------------- Web/logic.js | 12 ++-- 2 files changed, 72 insertions(+), 83 deletions(-) diff --git a/Web/cytoscape.min.js b/Web/cytoscape.min.js index 5db0c4b6a..728963bd3 100644 --- a/Web/cytoscape.min.js +++ b/Web/cytoscape.min.js @@ -594,7 +594,7 @@ }, K = /\s/; var G = function (e) { - for (var t = e.length; t-- && K.test(e.charAt(t)); ); + for (var t = e.length; t-- && K.test(e.charAt(t));); return t; }, U = /^\s+/; @@ -1203,7 +1203,7 @@ var s; if ((null == i && (i = 0), null == o && (o = n), i < 0)) throw new Error("lo must be non-negative"); - for (null == a && (a = e.length); i < a; ) + for (null == a && (a = e.length); i < a;) o(t, e[(s = r((i + a) / 2))]) < 0 ? (a = s) : (i = s + 1); return ([].splice.apply(e, [i, i - i].concat(t)), t); }), @@ -1475,7 +1475,7 @@ r = t, i = r.id(); if (t.length > 0) - for (n.unshift(t); c[i]; ) { + for (n.unshift(t); c[i];) { var a = c[i]; (n.unshift(a.edge), n.unshift(a.node), (i = (r = a.node).id())); } @@ -1566,7 +1566,7 @@ (g.push(e), v.add(t)); }; (b(r, c), (h[c] = 0), (p[c] = a(r))); - for (var x, w = 0; g.size() > 0; ) { + for (var x, w = 0; g.size() > 0;) { if (((l = g.pop()), (u = l.id()), v.delete(u), w++, u === d)) { for ( var E = [], k = i, C = d, S = m[C]; @@ -1682,7 +1682,7 @@ var o, s = t.collection(), l = r; - for (s.merge(a); r !== i; ) + for (s.merge(a); r !== i;) ((l = r), (r = m[r * u + i]), (o = b[l * u + r]), @@ -1788,7 +1788,7 @@ var X = j[Y], W = [X]; W.push(m(X).edge); - for (var H = m(X).pred; -1 === W.indexOf(H); ) + for (var H = m(X).pred; -1 === W.indexOf(H);) (W.push(H), W.push(m(H).edge), (H = m(H).pred)); for ( var K = (W = W.slice(W.indexOf(H)))[0].id(), G = 0, U = 2; @@ -1864,7 +1864,7 @@ return l; }, gt = function (e, t, n, r) { - for (; n > r; ) { + for (; n > r;) { var i = Math.floor(Math.random() * t.length); ((t = ft(i, e, t)), n--); } @@ -2804,7 +2804,7 @@ var g = o[f].id(); ((l[g] = []), (u[g] = 0), (h[g] = 1 / 0)); } - for (u[t] = 1, h[t] = 0, p.push(t); !p.empty(); ) { + for (u[t] = 1, h[t] = 0, p.push(t); !p.empty();) { var v = p.pop(); if ((n.push(v), i)) for (var y = 0; y < s[v].length; y++) { @@ -2832,7 +2832,7 @@ } } for (var C = {}, S = 0; S < o.length; S++) C[o[S].id()] = 0; - for (; n.length > 0; ) { + for (; n.length > 0;) { for (var P = n.pop(), D = 0; D < l[P].length; D++) { var T = l[P][D]; C[T] = C[T] + (u[T] / u[P]) * (1 + C[P]); @@ -2942,7 +2942,7 @@ for (var r = 0; r < t; r++) e[r * t + r] = n; })(c, l, i.multFactor), vn(c, l)); - for (var y = !0, m = 0; y && m < i.maxIterations; ) + for (var y = !0, m = 0; y && m < i.maxIterations;) ((y = !1), (s = mn(c, l, i.expandFactor)), (c = bn(s, l, i.inflateFactor)), @@ -3101,7 +3101,7 @@ var n = new Array(t); if (e.length < 50) for (var r = 0; r < t; r++) { - for (var i = e[Math.floor(Math.random() * e.length)]; jn(i, n, r); ) + for (var i = e[Math.floor(Math.random() * e.length)]; jn(i, n, r);) i = e[Math.floor(Math.random() * e.length)]; n[r] = i; } @@ -3159,7 +3159,7 @@ for (var f = 0; f < s.k; f++) t[f] = new Array(s.attributes.length); i = new Array(o.length); for (var g = 0; g < o.length; g++) i[g] = new Array(s.k); - for (var v = !0, y = 0; v && y < s.maxIterations; ) + for (var v = !0, y = 0; v && y < s.maxIterations;) ((v = !1), Xn(t, o, n, i, s), Wn(n, r, t, o, s), @@ -3198,7 +3198,7 @@ ? o.testCentroids : Ln(i, o.k, o.attributes)) : (n = Ln(i, o.k, o.attributes)); - for (var u = !0, c = 0; u && c < o.maxIterations; ) { + for (var u = !0, c = 0; u && c < o.maxIterations;) { for (var d = 0; d < i.length; d++) l[(a = i[d]).id()] = On(a, n, o.distance, o.attributes, "kMeans"); u = !1; @@ -3241,7 +3241,7 @@ ? "number" == typeof s.testCentroids || (n = "object" === e(s.testCentroids) ? s.testCentroids : qn(a, s.k)) : (n = qn(a, s.k)); - for (var d = !0, h = 0; d && h < s.maxIterations; ) { + for (var d = !0, h = 0; d && h < s.maxIterations;) { for (var p = 0; p < a.length; p++) u[(o = a[p]).id()] = On(o, n, s.distance, s.attributes, "kMedoids"); d = !1; @@ -3407,7 +3407,7 @@ (s[p][h] = f), f < s[h][l[h]] && (l[h] = p)); } - for (var g, v = Zn(o, u, s, l, r); v; ) v = Zn(o, u, s, l, r); + for (var g, v = Zn(o, u, s, l, r); v;) v = Zn(o, u, s, l, r); return ( "dendrogram" === r.mode ? ((g = (function e(t, n, r) { @@ -3832,7 +3832,7 @@ }), t[s].index === t[s].low) ) { - for (var l = e.spawn(); ; ) { + for (var l = e.spawn(); ;) { var u = i.pop(); if ( (l.merge(e.getElementById(u)), @@ -3931,7 +3931,7 @@ } else i || (i = l[0].id()); var p = function (e) { - for (var t, n, r, i = e, a = [e]; c[i].length; ) + for (var t, n, r, i = e, a = [e]; c[i].length;) ((t = c[i].shift()), (n = d[t][0]), i != (r = d[t][1]) @@ -3951,7 +3951,7 @@ }, f = [], g = []; - for (g = p(i); 1 != g.length; ) + for (g = p(i); 1 != g.length;) 0 == c[g[0]].length ? (f.unshift(l.getElementById(g.shift())), f.unshift(l.getElementById(g.shift()))) @@ -4485,7 +4485,7 @@ function Gr(e) { var t = -1, n = null == e ? 0 : e.length; - for (this.clear(); ++t < n; ) { + for (this.clear(); ++t < n;) { var r = e[t]; this.set(r[0], r[1]); } @@ -4503,7 +4503,7 @@ return e === t || (e != e && t != t); }; var Qr = function (e, t) { - for (var n = e.length; n--; ) if ($r(e[n][0], t)) return n; + for (var n = e.length; n--;) if ($r(e[n][0], t)) return n; return -1; }, Jr = Array.prototype.splice; @@ -4531,7 +4531,7 @@ function ii(e) { var t = -1, n = null == e ? 0 : e.length; - for (this.clear(); ++t < n; ) { + for (this.clear(); ++t < n;) { var r = e[t]; this.set(r[0], r[1]); } @@ -4579,7 +4579,7 @@ function fi(e) { var t = -1, n = null == e ? 0 : e.length; - for (this.clear(); ++t < n; ) { + for (this.clear(); ++t < n;) { var r = e[t]; this.set(r[0], r[1]); } @@ -4625,7 +4625,7 @@ ); }); var wi = function (e, t) { - for (var n = -1, r = null == e ? 0 : e.length, i = Array(r); ++n < r; ) + for (var n = -1, r = null == e ? 0 : e.length, i = Array(r); ++n < r;) i[n] = t(e[n], n, e); return i; }, @@ -4650,7 +4650,7 @@ return "0" == t && 1 / e == -1 / 0 ? "-0" : t; }; var Ti = function (e, t) { - for (var n = 0, r = (t = Pi(t, e)).length; null != e && n < r; ) + for (var n = 0, r = (t = Pi(t, e)).length; null != e && n < r;) e = e[Di(t[n++])]; return n && n == r ? e : void 0; }; @@ -4710,7 +4710,7 @@ var Ri = function (e, t) { var n = -1, r = e.length; - for (t || (t = Array(r)); ++n < r; ) t[n] = e[n]; + for (t || (t = Array(r)); ++n < r;) t[n] = e[n]; return t; }; var Vi = function (e) { @@ -5987,7 +5987,7 @@ return this.spawn(t, !0).filter(e); }, parents: function (e) { - for (var t = [], n = this.parent(); n.nonempty(); ) { + for (var t = [], n = this.parent(); n.nonempty();) { for (var r = 0; r < n.length; r++) { var i = n[r]; t.push(i); @@ -6060,7 +6060,7 @@ var l = e[s]; n ? i.push(l) : o && r(i, a, l); } - for (; i.length > 0; ) { + for (; i.length > 0;) { var u = i.shift(); (t(u), a.add(u.id()), o && r(i, a, u)); } @@ -6306,13 +6306,11 @@ i.startBatch(); for (var a = 0; a < this.length; a++) { var o = this[a]; - if ( - !( - i.hasCompoundNodes() && - o.isChild() && - o.ancestors().anySame(this) - ) - ) { + if (!( + i.hasCompoundNodes() && + o.isChild() && + o.ancestors().anySame(this) + )) { var s = o.position(), l = { x: s.x + r.x, y: s.y + r.y }; n ? o.silentPosition(l) : o.position(l); @@ -8414,7 +8412,7 @@ }, $o = function (e) { return function (t) { - for (var n = this, r = [], i = {}; ; ) { + for (var n = this, r = [], i = {}; ;) { var a = e.outgoing ? n.outgoers() : n.incomers(); if (0 === a.length) break; for (var o = !1, s = 0; s < a.length; s++) { @@ -8908,7 +8906,7 @@ (N.parent = void 0), (B._private.parent = null)); else { - for (var L = !1, O = A; !O.empty(); ) { + for (var L = !1, O = A; !O.empty();) { if (B.same(O)) { ((L = !0), (N.parent = void 0)); break; @@ -9727,7 +9725,7 @@ this.notify("destroy"); var e = this.container(); if (e) - for (e._cyreg = null; e.childNodes.length > 0; ) + for (e._cyreg = null; e.childNodes.length > 0;) e.removeChild(e.childNodes[0]); ((this._private.renderer = null), this.mutableElements().forEach(function (e) { @@ -10548,7 +10546,7 @@ function o() { n = n.length > r.length ? n.substr(r.length) : ""; } - for (i = i.replace(/[/][*](\s|.)+?[*][/]/g, ""); ; ) { + for (i = i.replace(/[/][*](\s|.)+?[*][/]/g, ""); ;) { if (i.match(/^\s*$/)) break; var s = i.match(/^\s*((?:.|\s)+?)\s*\{((?:.|\s)+?)\}/); if (!s) { @@ -10572,7 +10570,7 @@ var u = s[2], c = !1; n = u; - for (var d = []; ; ) { + for (var d = []; ;) { if (n.match(/^\s*$/)) break; var h = n.match(/^\s*(.+?)\s*:\s*(.+?)(?:\s*;|\s*$)/); if (!h) { @@ -11821,15 +11819,13 @@ if (c.color) { var g = p.value, b = f.value; - if ( - !( - g[0] !== b[0] || - g[1] !== b[1] || - g[2] !== b[2] || - (g[3] !== b[3] && - ((null != g[3] && 1 !== g[3]) || (null != b[3] && 1 !== b[3]))) - ) - ) + if (!( + g[0] !== b[0] || + g[1] !== b[1] || + g[2] !== b[2] || + (g[3] !== b[3] && + ((null != g[3] && 1 !== g[3]) || (null != b[3] && 1 !== b[3]))) + )) return !1; } return { @@ -13353,11 +13349,11 @@ u = !0; if (!0 === e.animate) { !(function t() { - for (var n = 0; u && n < e.refresh; ) ((u = o(l)), l++, n++); + for (var n = 0; u && n < e.refresh;) ((u = o(l)), l++, n++); u ? (we() - i >= e.animationThreshold && a(), xe(t)) : (gl(r, e), s()); })(); } else { - for (; u; ) ((u = o(l)), l++); + for (; u;) ((u = o(l)), l++); (gl(r, e), s()); } return this; @@ -13443,7 +13439,7 @@ ? o.layoutNodes[o.idToIndex[b]].children.push(m.id) : ((p[++g] = m.id), v.push(m.id)); } - for (o.graphSet.push(v); f <= g; ) { + for (o.graphSet.push(v); f <= g;) { var x = p[f++], w = o.idToIndex[x], E = o.layoutNodes[w].children; @@ -13478,7 +13474,7 @@ -1 === N.indexOf(I.id); ) ((I = o.layoutNodes[o.idToIndex[I.parentId]]), z++); - for (I = o.layoutNodes[M]; -1 === N.indexOf(I.id); ) + for (I = o.layoutNodes[M]; -1 === N.indexOf(I.id);) ((I = o.layoutNodes[o.idToIndex[I.parentId]]), z++); D *= z * n.nestingFactor; } @@ -13682,10 +13678,7 @@ var n = [], r = 0, i = -1; - for ( - n.push.apply(n, e.graphSet[0]), i += e.graphSet[0].length; - r <= i; - ) { + for (n.push.apply(n, e.graphSet[0]), i += e.graphSet[0].length; r <= i;) { var a = n[r++], o = e.idToIndex[a], s = e.layoutNodes[o], @@ -13865,7 +13858,7 @@ g = d(); (f - 1) * g >= o ? c(f - 1) : (g - 1) * f >= o && d(g - 1); } else - for (; u * l < o; ) { + for (; u * l < o;) { var v = c(), y = d(); (y + 1) * v >= o ? d(y + 1) : c(v + 1); @@ -13905,8 +13898,8 @@ L = t.position(A); if (L && (void 0 !== L.row || void 0 !== L.col)) { var O = { row: L.row, col: L.col }; - if (void 0 === O.col) for (O.col = 0; T(O.row, O.col); ) O.col++; - else if (void 0 === O.row) for (O.row = 0; T(O.row, O.col); ) O.row++; + if (void 0 === O.col) for (O.col = 0; T(O.row, O.col);) O.col++; + else if (void 0 === O.row) for (O.row = 0; T(O.row, O.col);) O.row++; ((z[A.id()] = O), _(O.row, O.col)); } } @@ -13916,7 +13909,7 @@ var i = z[e.id()]; if (i) ((n = i.col * m + m / 2 + a.x1), (r = i.row * b + b / 2 + a.y1)); else { - for (; T(M, B); ) N(); + for (; T(M, B);) N(); ((n = B * m + m / 2 + a.x1), (r = M * b + b / 2 + a.y1), _(M, B), @@ -16035,7 +16028,7 @@ w = 0, E = l(v.matchAll(f)); try { - for (E.s(); !(b = E.n()).done; ) { + for (E.s(); !(b = E.n()).done;) { var k = b.value, C = k[0], S = v.substring(w, k.index); @@ -16525,7 +16518,7 @@ e.invalidateContainerClientCoordsCache(); }; (!(function (e, t) { - for (; null != e; ) (t(e), (e = e.parentNode)); + for (; null != e;) (t(e), (e = e.parentNode)); })(e.container, function (t) { (e.registerBinding(t, "transitionend", y), e.registerBinding(t, "animationend", y), @@ -16562,7 +16555,7 @@ } } if (!l) return !1; - for (var d = e.container, h = t.target.parentNode, p = !1; h; ) { + for (var d = e.container, h = t.target.parentNode, p = !1; h;) { if (h === d) { p = !0; break; @@ -18525,7 +18518,7 @@ u = [], c = n.cy.extent(), d = n.getPixelRatio(); - for (i || n.flushRenderedStyleQueue(); ; ) { + for (i || n.flushRenderedStyleQueue(); ;) { var h = we(), p = h - o, f = h - a; @@ -19286,7 +19279,7 @@ } }), (Du.dequeue = function (e) { - for (var t = this.layersQueue, n = [], r = 0; r < 1 && 0 !== t.size(); ) { + for (var t = this.layersQueue, n = [], r = 0; r < 1 && 0 !== t.size();) { var i = t.peek(); if (i.replacement) t.pop(); else if (i.replaces && i !== i.replaces.replacement) t.pop(); @@ -19677,7 +19670,7 @@ var g, v = l(a.roundCorners); try { - for (v.s(); !(g = v.n()).done; ) { + for (v.s(); !(g = v.n()).done;) { Ql(t, g.value); } } catch (e) { @@ -19752,16 +19745,14 @@ )); }), (Xu.drawArrowhead = function (e, t, n, r, i, a, o) { - if ( - !( - isNaN(r) || - null == r || - isNaN(i) || - null == i || - isNaN(a) || - null == a - ) - ) { + if (!( + isNaN(r) || + null == r || + isNaN(i) || + null == i || + isNaN(a) || + null == a + )) { var s = t.pstyle(n + "-arrow-shape").value; if ("none" !== s) { var l = diff --git a/Web/logic.js b/Web/logic.js index 9ca064fa8..ba11ecc94 100644 --- a/Web/logic.js +++ b/Web/logic.js @@ -190,13 +190,11 @@ function isValidSha(str) { if (str.length < 7 || str.length > 40) return false; for (let i = 0; i < str.length; ++i) { const c = str[i]; - if ( - !( - (c >= "0" && c <= "9") || - (c >= "a" && c <= "f") || - (c >= "A" && c <= "F") - ) - ) { + if (!( + (c >= "0" && c <= "9") || + (c >= "a" && c <= "f") || + (c >= "A" && c <= "F") + )) { return false; } } From df81f36ef6574aca94b4fb284f7bc67a4f9414d6 Mon Sep 17 00:00:00 2001 From: github-actions <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 30 Jun 2026 09:20:42 +0000 Subject: [PATCH 17/18] Automatic Clang-Format: Standardized formatting automatically --- CCU/Application/Src/StateTicks.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CCU/Application/Src/StateTicks.c b/CCU/Application/Src/StateTicks.c index f02a1bcc5..70be9b322 100644 --- a/CCU/Application/Src/StateTicks.c +++ b/CCU/Application/Src/StateTicks.c @@ -69,7 +69,7 @@ void STATE_CHARGING(CCU_StateData *state_data) return; } - if (CriticalError(state_data)) { + if (CriticalError(state_data)) { TripSoftwareLatch(state_data); state_data->state = CCU_STATE_IDLE; From 552d12a8a044e54e1ff8bde9a7b6f00a63b42dde Mon Sep 17 00:00:00 2001 From: Daniel Hansen Date: Tue, 30 Jun 2026 02:34:45 -0700 Subject: [PATCH 18/18] Use explicit versioning so that all actions can be forced to use explicit versioning Signed-off-by: Daniel Hansen --- .github/workflows/AutoFormat.yml | 12 ++++++------ .github/workflows/Autogen.yml | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/AutoFormat.yml b/.github/workflows/AutoFormat.yml index 6dd6010ed..1256d5581 100644 --- a/.github/workflows/AutoFormat.yml +++ b/.github/workflows/AutoFormat.yml @@ -19,7 +19,7 @@ jobs: id-token: write steps: - name: Acquire Secrets - uses: Gaucho-Racing/vault-pull-secrets@v1 + uses: Gaucho-Racing/vault-pull-secrets@fa8269ea0faa78bd55f8628fd13680dae68908a2 # v1.3.0 with: secrets: firmware-monorepo-autoformat.github_pat @@ -60,7 +60,7 @@ jobs: id-token: write steps: - name: Acquire Secrets - uses: Gaucho-Racing/vault-pull-secrets@v1 + uses: Gaucho-Racing/vault-pull-secrets@fa8269ea0faa78bd55f8628fd13680dae68908a2 # v1.3.0 with: secrets: firmware-monorepo-autoformat.github_pat @@ -99,7 +99,7 @@ jobs: id-token: write steps: - name: Acquire Secrets - uses: Gaucho-Racing/vault-pull-secrets@v1 + uses: Gaucho-Racing/vault-pull-secrets@fa8269ea0faa78bd55f8628fd13680dae68908a2 # v1.3.0 with: secrets: firmware-monorepo-autoformat.github_pat @@ -134,7 +134,7 @@ jobs: id-token: write steps: - name: Acquire Secrets - uses: Gaucho-Racing/vault-pull-secrets@v1 + uses: Gaucho-Racing/vault-pull-secrets@fa8269ea0faa78bd55f8628fd13680dae68908a2 # v1.3.0 with: secrets: firmware-monorepo-autoformat.github_pat @@ -174,7 +174,7 @@ jobs: id-token: write steps: - name: Acquire Secrets - uses: Gaucho-Racing/vault-pull-secrets@v1 + uses: Gaucho-Racing/vault-pull-secrets@fa8269ea0faa78bd55f8628fd13680dae68908a2 # v1.3.0 with: secrets: firmware-monorepo-autoformat.github_pat @@ -220,7 +220,7 @@ jobs: id-token: write steps: - name: Acquire Secrets - uses: Gaucho-Racing/vault-pull-secrets@v1 + uses: Gaucho-Racing/vault-pull-secrets@fa8269ea0faa78bd55f8628fd13680dae68908a2 # v1.3.0 with: secrets: firmware-monorepo-autoformat.github_pat diff --git a/.github/workflows/Autogen.yml b/.github/workflows/Autogen.yml index 957e9e2d0..4334f2219 100644 --- a/.github/workflows/Autogen.yml +++ b/.github/workflows/Autogen.yml @@ -20,7 +20,7 @@ jobs: id-token: write steps: - name: Acquire Secrets - uses: Gaucho-Racing/vault-pull-secrets@v1 + uses: Gaucho-Racing/vault-pull-secrets@fa8269ea0faa78bd55f8628fd13680dae68908a2 # v1.3.0 with: secrets: firmware-monorepo-autoformat.github_pat