fix(API): Match repo_sync events to the correct response#747
Closed
horstmannmat wants to merge 3 commits intophrase:masterfrom
horstmannmat:fix/change-repo-sync-events-to-match-api
Closed
fix(API): Match repo_sync events to the correct response#747horstmannmat wants to merge 3 commits intophrase:masterfrom horstmannmat:fix/change-repo-sync-events-to-match-api
horstmannmat wants to merge 3 commits intophrase:masterfrom
horstmannmat:fix/change-repo-sync-events-to-match-api
Conversation
Collaborator
|
hey @horstmannmat thanks a lot for the quick reaction and your PR. I will review it and test it immediately, and also open an internal ticket for pull request URL. |
Contributor
Author
|
Fixed in #748 |
Collaborator
|
@horstmannmat the PR url is also exposed now: |
Contributor
Author
|
@jablan Thank you so much, for your quick response :) just a additional comment, by any chances you guys plan to add a automerge option to the export command or the webhook? Right now we cannot you webhook due the lack of this option. |
Collaborator
|
hey @horstmannmat I'm not familiar with auto merge feature, but it seems that setting it on a PR is (still?) not supported through Github API |
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.
We use
phrase-cliin our CI/CD pipeline to automate merges to our repositories. However, the recent changes introduced in #735 have broken our process.While upgrading our pipeline to use
repo_sync, I encountered the following issues withphrase-cli:Issues Description
Missing
event_typeandpull_request_urlphrase-clidoes not provide theevent_typeof the sync event or thepull_request_url. These details are critical for avoiding multiple merge requests in our CI/CD.typeinstead ofevent_type, which caused discrepancies in the schemas. I’ve updated the schemas in this PR to match the API response.Reproduction
Example with
phrase-cli:Example with curl (fetching type but missing pull_request_url):
I’ve updated the schemas in this PR to match the API response.
Command Parsing conflicts::
When parsing the commands in api_repo_syncs.go#L169 and api_repo_syncs.go#L499, a conflict arises as shown in (this snippet)[https://go.dev/play/p/DoeBHQOf-oI]
For instance, the output of the help command demonstrates duplicate show commands:
I changed the
operationIdto berepo_sync/events_showso it will create a new commandevents_showavoiding the conflictExtra fixes:
Documentation Discrepancy:
Some API references use repo_sync where they should use repo_syncs.
The API documentation for Get a Single Repo Sync Event incorrectly references the command as repo_sync_event. So I took the opportunity to correct this in the documentation.
Request for Additional Fix
API does not return the
pull_request_url. This seems to be in a private repository. It would be great if this could be addressed as it’s essential for our CI/CD workflow.