From 2a2c77eaf5a958d15daed179db8bdb4bf4b9d15d Mon Sep 17 00:00:00 2001 From: shortcuts Date: Thu, 17 Oct 2024 14:16:40 +0200 Subject: [PATCH 1/5] chore: use skip-checks trailers [skip-bc] --- scripts/ci/codegen/pushGeneratedCode.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/ci/codegen/pushGeneratedCode.ts b/scripts/ci/codegen/pushGeneratedCode.ts index 1037bdd7fd..9439773b6c 100644 --- a/scripts/ci/codegen/pushGeneratedCode.ts +++ b/scripts/ci/codegen/pushGeneratedCode.ts @@ -56,9 +56,10 @@ export async function pushGeneratedCode(): Promise { let baseMessage = IS_RELEASE_COMMIT && isMainBranch ? text.commitReleaseMessage : `%s ${text.commitEndMessage}`; const commitMessage = await run( - `git show -s ${baseBranch} --format="${baseMessage} [skip-ci] + `git show -s ${baseBranch} --format="${baseMessage} Co-authored-by: %an <%ae> +%(trailers:key=skip-checks)" %(trailers:key=Co-authored-by)"`, ); From a0ea6be7bc27902d7a2d419c5ab95a97a00a094a Mon Sep 17 00:00:00 2001 From: shortcuts Date: Thu, 17 Oct 2024 14:19:45 +0200 Subject: [PATCH 2/5] chore: command instead --- scripts/ci/codegen/pushGeneratedCode.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/scripts/ci/codegen/pushGeneratedCode.ts b/scripts/ci/codegen/pushGeneratedCode.ts index 9439773b6c..b9a9825845 100644 --- a/scripts/ci/codegen/pushGeneratedCode.ts +++ b/scripts/ci/codegen/pushGeneratedCode.ts @@ -59,13 +59,12 @@ export async function pushGeneratedCode(): Promise { `git show -s ${baseBranch} --format="${baseMessage} Co-authored-by: %an <%ae> -%(trailers:key=skip-checks)" %(trailers:key=Co-authored-by)"`, ); console.log(`Pushing code to generated branch: '${branchToPush}'`); await run('git add .'); - await run(`git commit -m "${commitMessage.replaceAll('"', '\\"')}"`); + await run(`git commit -m "${commitMessage.replaceAll('"', '\\"')}" --trailer skip-checks:true --cleanup=verbatim`); await run(`git push origin ${branchToPush}`); setOutput('GENERATED_COMMIT', await run('git rev-parse HEAD')); From 2221465518aba0980912572f97e5f0a40eaba6fc Mon Sep 17 00:00:00 2001 From: shortcuts Date: Thu, 17 Oct 2024 14:24:30 +0200 Subject: [PATCH 3/5] chore: generated branch --- specs/ingestion/spec.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/specs/ingestion/spec.yml b/specs/ingestion/spec.yml index 594c9b3ec1..31559178e8 100644 --- a/specs/ingestion/spec.yml +++ b/specs/ingestion/spec.yml @@ -33,7 +33,6 @@ info: ## Response status and errors Response bodies are JSON objects. - Deleting a user token returns an empty response body with rate-limiting information as headers. Successful responses return a `2xx` status. Client errors return a `4xx` status. Server errors are indicated by a `5xx` status. Error responses have a `message` property with more information. From 04e9eb4060bd0613ab7c0fc9876486f8974a79bc Mon Sep 17 00:00:00 2001 From: shortcuts Date: Thu, 17 Oct 2024 14:40:15 +0200 Subject: [PATCH 4/5] foo Co-authored-by: shortcuts skip-checks: true --- scripts/ci/codegen/pushGeneratedCode.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/scripts/ci/codegen/pushGeneratedCode.ts b/scripts/ci/codegen/pushGeneratedCode.ts index b9a9825845..c13226d0ea 100644 --- a/scripts/ci/codegen/pushGeneratedCode.ts +++ b/scripts/ci/codegen/pushGeneratedCode.ts @@ -58,13 +58,16 @@ export async function pushGeneratedCode(): Promise { const commitMessage = await run( `git show -s ${baseBranch} --format="${baseMessage} + Co-authored-by: %an <%ae> +skip-checks: true +%(trailers:key=skip-checks) %(trailers:key=Co-authored-by)"`, ); console.log(`Pushing code to generated branch: '${branchToPush}'`); await run('git add .'); - await run(`git commit -m "${commitMessage.replaceAll('"', '\\"')}" --trailer skip-checks:true --cleanup=verbatim`); + await run(`git commit -m "${commitMessage.replaceAll('"', '\\"')}" --cleanup=verbatim`); await run(`git push origin ${branchToPush}`); setOutput('GENERATED_COMMIT', await run('git rev-parse HEAD')); From c65d59014d8daebf5b7d565e74b7b22103405a3c Mon Sep 17 00:00:00 2001 From: shortcuts Date: Thu, 17 Oct 2024 14:55:35 +0200 Subject: [PATCH 5/5] chore: better en securite than desole --- scripts/ci/codegen/pushGeneratedCode.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/ci/codegen/pushGeneratedCode.ts b/scripts/ci/codegen/pushGeneratedCode.ts index c13226d0ea..e118f5f86c 100644 --- a/scripts/ci/codegen/pushGeneratedCode.ts +++ b/scripts/ci/codegen/pushGeneratedCode.ts @@ -61,8 +61,8 @@ export async function pushGeneratedCode(): Promise { Co-authored-by: %an <%ae> skip-checks: true -%(trailers:key=skip-checks) -%(trailers:key=Co-authored-by)"`, +%(trailers:key=Co-authored-by) +%(trailers:key=skip-checks)"`, ); console.log(`Pushing code to generated branch: '${branchToPush}'`);