Greetings,
Our team manages a Playcanvas application that is currently live, and needs frequent updates. We self-host our application, and for pipeline-customization purposes we prefer to do our code reviews through Bitbucket. However, we want to keep using the Playcanvas Editor. For that purpose, we came up with a hybrid version-control process.
We already have a ‘pull-editor’ script, which downloads and unzips a given branch to our bitbucket repo, using the Rest API.
What we want however is the reverse operation: Taking a downloaded build that has been modified by a bitbucket merge, then updating the Editor branch to match it. Essentially, pushing changes upstream (with the main purpose being to update our Editor main branch to match our Bitbucket main branch after PR merges).
We are trying to achieve this by using existing Rest API functions. We are aware of the API limitations on asset types, so we plan to use this pipeline mainly for script files.
We have been looking through the vscode-extension project for ideas, as it is similar to what we need, but we want our version to store files locally instead of an ephemeral workspace.
Other questions we have in achieving this are:
- How are merge conflicts dealt with when updating assets via rest API?
- Can we possibly trigger Editor branch merges via API? (i.e: trigger the functionality of the ‘merge into current branch’ Editor VC option via pipeline code).
Notes: So far, we have been successful in applying the existing API functionality to get partial results. The main challenges we are facing is keeping exact track of changes/deletions and keeping Editor folder-structure between separate branches, as we are currently storing our bitbucket project in a self-publishing build format (which doesn’t keep folder-structure information). We have some ideas on using the existing API functions to get the necessary asset info from the incoming branch merge using git merge history though.
Any feedback is appreciated. I am attaching a graph of what we want to achieve with our pipeline.