From 631406338df3d9a1bb0d4296d02f7208d614d9c9 Mon Sep 17 00:00:00 2001 From: shortcuts Date: Thu, 17 Oct 2024 15:48:37 +0200 Subject: [PATCH 1/5] Revert "chore: use skip-checks trailers [skip-bc] (#3982)" This reverts commit 70f2f49cbbcab65e96b3a351de77a34fdef02581. --- scripts/ci/codegen/pushGeneratedCode.ts | 9 +++------ specs/ingestion/spec.yml | 1 + 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/scripts/ci/codegen/pushGeneratedCode.ts b/scripts/ci/codegen/pushGeneratedCode.ts index e118f5f86c..1037bdd7fd 100644 --- a/scripts/ci/codegen/pushGeneratedCode.ts +++ b/scripts/ci/codegen/pushGeneratedCode.ts @@ -56,18 +56,15 @@ 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} - + `git show -s ${baseBranch} --format="${baseMessage} [skip-ci] Co-authored-by: %an <%ae> -skip-checks: true -%(trailers:key=Co-authored-by) -%(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('"', '\\"')}" --cleanup=verbatim`); + await run(`git commit -m "${commitMessage.replaceAll('"', '\\"')}"`); await run(`git push origin ${branchToPush}`); setOutput('GENERATED_COMMIT', await run('git rev-parse HEAD')); diff --git a/specs/ingestion/spec.yml b/specs/ingestion/spec.yml index 31559178e8..594c9b3ec1 100644 --- a/specs/ingestion/spec.yml +++ b/specs/ingestion/spec.yml @@ -33,6 +33,7 @@ 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 4a33060b932e5175e4c21fae45ada77ca6182dfb Mon Sep 17 00:00:00 2001 From: shortcuts Date: Thu, 17 Oct 2024 15:48:52 +0200 Subject: [PATCH 2/5] Revert "fix(specs): remove `parentID` from ingestion specs [skip-bc] (#3981)" This reverts commit 451bf717b9c2b925fcabf755a9140da95bfa0d3d. --- scripts/ci/codegen/pushGeneratedCode.ts | 8 ++++++-- specs/ingestion/common/schemas/event.yml | 4 ++++ 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/scripts/ci/codegen/pushGeneratedCode.ts b/scripts/ci/codegen/pushGeneratedCode.ts index 1037bdd7fd..369b596b85 100644 --- a/scripts/ci/codegen/pushGeneratedCode.ts +++ b/scripts/ci/codegen/pushGeneratedCode.ts @@ -53,10 +53,14 @@ export async function pushGeneratedCode(): Promise { return; } - let baseMessage = IS_RELEASE_COMMIT && isMainBranch ? text.commitReleaseMessage : `%s ${text.commitEndMessage}`; + let baseMessage = `%s ${text.commitEndMessage}`; + if (IS_RELEASE_COMMIT || isMainBranch) { + console.log('Processing release commit'); + baseMessage = `${text.commitReleaseMessage} [skip ci]`; + } 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=Co-authored-by)"`, diff --git a/specs/ingestion/common/schemas/event.yml b/specs/ingestion/common/schemas/event.yml index e7f69350ef..ec193682ba 100644 --- a/specs/ingestion/common/schemas/event.yml +++ b/specs/ingestion/common/schemas/event.yml @@ -7,6 +7,10 @@ Event: $ref: './common.yml#/eventID' runID: $ref: './common.yml#/runID' + parentID: + type: string + description: The parent event, the cause of this event. + example: 6c02aeb1-775e-418e-870b-1faccd4b2c0f status: $ref: '#/EventStatus' type: From bb6599d58402cd1477757c2e49a096995b6fd2e6 Mon Sep 17 00:00:00 2001 From: shortcuts Date: Thu, 17 Oct 2024 15:49:03 +0200 Subject: [PATCH 3/5] chore: revert revert ingestion specs --- specs/ingestion/common/schemas/event.yml | 4 ---- specs/ingestion/spec.yml | 1 - 2 files changed, 5 deletions(-) diff --git a/specs/ingestion/common/schemas/event.yml b/specs/ingestion/common/schemas/event.yml index ec193682ba..e7f69350ef 100644 --- a/specs/ingestion/common/schemas/event.yml +++ b/specs/ingestion/common/schemas/event.yml @@ -7,10 +7,6 @@ Event: $ref: './common.yml#/eventID' runID: $ref: './common.yml#/runID' - parentID: - type: string - description: The parent event, the cause of this event. - example: 6c02aeb1-775e-418e-870b-1faccd4b2c0f status: $ref: '#/EventStatus' type: 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 d75670ddb0f8d14c6396d92b63d8fcbba8cf67bd Mon Sep 17 00:00:00 2001 From: shortcuts Date: Thu, 17 Oct 2024 15:49:12 +0200 Subject: [PATCH 4/5] Revert "chore: add co-author to generated commit (#3980)" This reverts commit 9fc19b6120b3f0287409b091fad56eedcdd0ef95. --- scripts/ci/codegen/pushGeneratedCode.ts | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/scripts/ci/codegen/pushGeneratedCode.ts b/scripts/ci/codegen/pushGeneratedCode.ts index 369b596b85..6daff2b8fb 100644 --- a/scripts/ci/codegen/pushGeneratedCode.ts +++ b/scripts/ci/codegen/pushGeneratedCode.ts @@ -53,22 +53,24 @@ export async function pushGeneratedCode(): Promise { return; } - let baseMessage = `%s ${text.commitEndMessage}`; - if (IS_RELEASE_COMMIT || isMainBranch) { - console.log('Processing release commit'); - baseMessage = `${text.commitReleaseMessage} [skip ci]`; - } - - const commitMessage = await run( - `git show -s ${baseBranch} --format="${baseMessage} - + const skipCi = isMainBranch ? '[skip ci]' : ''; + let message = await run(`git show -s ${baseBranch} --format="%s ${text.commitEndMessage} ${skipCi}"`); + const authors = await run( + `git show -s ${baseBranch} --format=" Co-authored-by: %an <%ae> %(trailers:key=Co-authored-by)"`, ); + if (IS_RELEASE_COMMIT && isMainBranch) { + console.log('Processing release commit'); + message = `${text.commitReleaseMessage} [skip ci]`; + } + + message += authors; + console.log(`Pushing code to generated branch: '${branchToPush}'`); await run('git add .'); - await run(`git commit -m "${commitMessage.replaceAll('"', '\\"')}"`); + await run(`git commit -m "${message.replaceAll('"', '\\"')}"`); await run(`git push origin ${branchToPush}`); setOutput('GENERATED_COMMIT', await run('git rev-parse HEAD')); From d9dfb89a9a595206059624fcfa02d498a12610f1 Mon Sep 17 00:00:00 2001 From: shortcuts Date: Thu, 17 Oct 2024 15:49:42 +0200 Subject: [PATCH 5/5] chore: newlines before coauthor --- scripts/ci/codegen/pushGeneratedCode.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/ci/codegen/pushGeneratedCode.ts b/scripts/ci/codegen/pushGeneratedCode.ts index 6daff2b8fb..451b417654 100644 --- a/scripts/ci/codegen/pushGeneratedCode.ts +++ b/scripts/ci/codegen/pushGeneratedCode.ts @@ -57,6 +57,8 @@ export async function pushGeneratedCode(): Promise { let message = await run(`git show -s ${baseBranch} --format="%s ${text.commitEndMessage} ${skipCi}"`); const authors = await run( `git show -s ${baseBranch} --format=" + + Co-authored-by: %an <%ae> %(trailers:key=Co-authored-by)"`, );