The open alternative to Salesforce, designed for AI.
TypeScript crmcrm-systemcustomergood-first-issuegraphqlhacktoberfestjavascriptmarketingmonoreponestjsopen-sourcepostgresqlreactreactjssalestypescriptweb
Improve breaking change CI (#12816)
FΓ©lix Malfait21f9db1f41e1
diff --git a/.github/workflows/breaking-changes.yaml b/.github/workflows/ci-breaking-changes.yamlsimilarity index 94%rename from .github/workflows/breaking-changes.yamlrename to .github/workflows/ci-breaking-changes.yamlindex 172501110e7..cc09e96c26e 100644--- a/.github/workflows/breaking-changes.yaml+++ b/.github/workflows/ci-breaking-changes.yaml@@ -28,6 +28,7 @@ jobs:packages/twenty-server/**packages/twenty-emails/**packages/twenty-shared/**+ .github/workflows/ci-breaking-changes.yamlapi-breaking-changes:needs: changed-files-check@@ -462,23 +463,8 @@ jobs:' rest-api-diff.json >> rest-api-diff.mdelif [ "$different" = "true" ]; then- echo "π Non-breaking changes detected ($new_endpoints new endpoints, $missing_endpoints removed, $changed_operations changed)"-- # Generate non-breaking changes report- echo "# REST API Changes" > rest-api-diff.md- echo "" >> rest-api-diff.md- echo "## Summary" >> rest-api-diff.md-- jq -r '- if (.newEndpoints | length) > 0 then- "### β New Endpoints (" + (.newEndpoints | length | tostring) + ")\n" +- (.newEndpoints | map("- " + .method + " " + .pathUrl + ": " + (.summary // "")) | join("\n"))- else "" end,- if (.changedOperations | length) > 0 then- "\n### π Changed Operations (" + (.changedOperations | length | tostring) + ")\n" +- (.changedOperations | map("- " + .method + " " + .pathUrl + ": " + (.summary // "Modified operation")) | join("\n"))- else "" end- ' rest-api-diff.json >> rest-api-diff.md+ echo "π Non-breaking changes detected ($new_endpoints new endpoints, $missing_endpoints removed, $changed_operations changed) - no PR comment will be posted"+ # Don't create markdown file for non-breaking changes to avoid PR commentselseecho "β No changes detected in REST API"# Don't create diff file for no changes@@ -522,13 +508,13 @@ jobs:if [ "$incompatible" = "true" ]; thenecho "β Breaking changes detected in REST Metadata API"- # Generate breaking changes report+ # Generate breaking changes report (only for breaking changes)echo "# REST Metadata API Breaking Changes" > rest-metadata-api-diff.mdecho "" >> rest-metadata-api-diff.mdecho "β οΈ **Breaking changes detected that may affect existing API consumers**" >> rest-metadata-api-diff.mdecho "" >> rest-metadata-api-diff.md- # Parse and format the changes from Java openapi-diff+ # Parse and format the changes from Java openapi-diffjq -r 'if (.missingEndpoints | length) > 0 then"## π¨ Removed Endpoints (" + (.missingEndpoints | length | tostring) + ")\n" +@@ -545,26 +531,10 @@ jobs:' rest-metadata-api-diff.json >> rest-metadata-api-diff.mdelif [ "$different" = "true" ]; then- echo "π Non-breaking changes detected ($new_endpoints new endpoints, $missing_endpoints removed, $changed_operations changed)"-- # Generate non-breaking changes report- echo "# REST Metadata API Changes" > rest-metadata-api-diff.md- echo "" >> rest-metadata-api-diff.md- echo "## Summary" >> rest-metadata-api-diff.md-- jq -r '- if (.newEndpoints | length) > 0 then- "### β New Endpoints (" + (.newEndpoints | length | tostring) + ")\n" +- (.newEndpoints | map("- " + .method + " " + .pathUrl + ": " + (.summary // "")) | join("\n"))- else "" end,- if (.changedOperations | length) > 0 then- "\n### π Changed Operations (" + (.changedOperations | length | tostring) + ")\n" +- (.changedOperations | map("- " + .method + " " + .pathUrl + ": " + (.summary // "Modified operation")) | join("\n"))- else "" end- ' rest-metadata-api-diff.json >> rest-metadata-api-diff.md+ echo "π Non-breaking changes detected ($new_endpoints new endpoints, $missing_endpoints removed, $changed_operations changed) - no PR comment will be posted"+ # Don't create markdown file for non-breaking changes to avoid PR commentselseecho "β No changes detected in REST Metadata API"- # Don't create diff file for no changesfielseecho "β οΈ OpenAPI diff tool could not process the metadata API files"@@ -675,7 +645,7 @@ jobs:}// Check PR title for "breaking"- const prTitle = "${{ github.event.pull_request.title }}";+ const prTitle = `${{ github.event.pull_request.title }}`;const titleContainsBreaking = prTitle.toLowerCase().includes('breaking');if (hasBreakingChanges) {