0

Currently, we trying to integrate CI/CD into our app. I can setup a workflow like this:

PR opened -> TestFlight

But we want to use it like this:

PR opened -> Code Review
PR Approval -> TestFlight

Is there any way to catch the Pull Request Approval event in XCode Cloud and do what I want?

Ruben Nahatakyan
  • 372
  • 3
  • 13

1 Answers1

0

I don't think there is support for that at the moment, but you could build it yourself with webhooks if wanted to go down that route.

I did something similar with one of GitHub's webhooks to upload to TestFlight using Xcode Cloud when a comment is left on a PR. If that sounds like something you'd be open to exploring I have an article on the topic:

https://www.polpiella.dev/github-webhooks-and-xcode-cloud

Pol Piella
  • 36
  • 4
  • Hi Pol. Thank you for your response. I am new in Ci/CD and maybe my question is wrong, but I have trouble with ` Enter the URL for the deployed server in the 'Payload URL' field, select 'application/json' as the 'Content type', and choose the 'Let me select individual events' option. ` I am using Bitbucket Cloud, and the parameters are not matched. I set these parameters for Triggers: Repository -> Push Issue -> (Nothing) Pull request -> Comment created But I don't know which URL should be there/ Repository URL or some URL from AppStorConnect. – Ruben Nahatakyan Apr 19 '23 at 17:37
  • And if second, then where can I find it? Thank you – Ruben Nahatakyan Apr 19 '23 at 17:37
  • For Bitbucket Cloud you should be able to use the [Pull Request -> Approved web hook](https://support.atlassian.com/bitbucket-cloud/docs/event-payloads/#Approved). A web hook is just a POST network request that gets sent when an action occurs, in this case whenever a user approves a PR. You will need to create and deploy a server that can handle POST requests. Once you have your server deployed at a URL, you can use this to configure the web hook in bitbucket cloud. This might give you some ideas: https://www.polpiella.dev/github-webhooks-and-xcode-cloud – Pol Piella Apr 25 '23 at 14:46