chore: add GitHub Action to sync Collins API spec to APIM - #30
Open
devin-ai-integration[bot] wants to merge 1 commit into
Open
chore: add GitHub Action to sync Collins API spec to APIM#30devin-ai-integration[bot] wants to merge 1 commit into
devin-ai-integration[bot] wants to merge 1 commit into
Conversation
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Contributor
Author
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a new GitHub Actions workflow (
.github/workflows/sync-to-apim.yml) that automatically bundles the Collins OpenAPI spec and pushes it to the APIOps Azure DevOps repo whenever spec files are updated onmaster.How it works:
masterthat modifymain.yamlor files underbookings/,customers/,venues/,venue-groups/,shared/@redocly/clito catch errors before anything is pushed downstreamspecification.yamlHospitality-Integration-Experience-ApiOps) using a PAT, copies the bundled spec toartifacts/apis/collins-api/specification.yaml, and pushes tomainif there are changesartifacts/**onmainin APIOps triggers the existingrun-publisher.yamlpipeline (deploys to Dev APIM, then manual approval for Prod)The existing
publish.yamlworkflow is not modified.Review & Testing Checklist for Human
AZURE_DEVOPS_PATsecret must be configured in the repo's GitHub Settings → Secrets → Actions before this workflow will function. Verify the PAT has write access to theHospitality-Integration-Experience-ApiOpsrepo and is not expired.artifacts/apis/collins-api/. If it doesn't, thecpcommand will fail. You may need to create it with an initial commit.main.yaml,bookings/**,customers/**,venues/**,venue-groups/**,shared/**covers all directories that contribute to the spec. If new top-level spec directories are added in the future, they'll need to be added here too (e.g.marketing-preferences/is not currently included — verify whether it should be).@redocly/cliversion: The workflow usesnpx @redocly/cliwithout a version pin. A breaking Redocly update could fail the workflow unexpectedly. Consider whether pinning (e.g.npx @redocly/cli@1.x) is preferred.Suggested test plan: After merging and configuring the PAT secret, make a trivial change to
main.yaml(e.g. update description text), push tomaster, and verify the Actions run succeeds and the bundled spec appears as a new commit in the APIOps repo.Notes
${{ secrets.AZURE_DEVOPS_PAT }}and masked by GitHub Actions, so it won't appear in logs.Link to Devin session: https://app.devin.ai/sessions/16003d76aa5a40a495560c6b1baef86e