Formplayer and CommCare Android both utilizes commcare-core as the underlining XForm engine. To minimize the disruptions from changes on one platform to another, we maintain two different branches formplayer and master for Formplayer and CommCare Android respectively.
We try to keep both these branches in sync with each other the best we can. To do that it's cruicial that you PR your changes against both these branches. Please find more information below on how to create these PRs depending on what platform you work with -
-
If you are working on a Formplayer change, you will want to start by checking out
your_feature_branchfromformplayeras the base branch. Make changes onyour_feature_branchand create your original PR againstformplayerbranch. -
Now you will need to duplicate this PR by making another PR against
master. Make sure the branch for this PR is is merged and is not deleted. Then create the commentduplicate this PR <starting-commit-id> <ending-commit-id>. Theending-commit-idshould be the last non-merge commit in the PR. This should result in a Github Actions workflow duplicating your PR againstmaster. Go to the duplicate PR, close and re-open it to run the Github checks against it. -
In order for us to test that your PR against
masterdoesn't break anything on CommCare Android, you need to run android side tests with your PR. To do this -- Go to the Android test PR
- Change "cross-request" PR in description to the duplicate PR created in step 2 above
- Make a comment saying
@damagatchi retest this please(example)
-
Request a review from
@shubham1g5on your duplicate commcare-core PR. Android devs will now be responsible to make any further Android compatibility changes for this PR if required and merge it.
-
If you are working on a CommCare Android change, you have to start by checking out
your_feature_branchfrommasteras the base branch. Make changes onyour_feature_branchand create your original PR againstmasterbranch. Get it approved and do not merge it. -
Now you will need to duplicate this PR by making another PR against
formplayer. For this create the commentduplicate this PR <starting-commit-id> <ending-commit-id>of theyour_feature_branch. Theending-commit-idshould be the last non-merge commit in the PR. This should result in a Github Actions workflow duplicating your PR againstformplayer. Go to the duplicate PR, close and re-open it to run the Github checks against it. -
After creating the successful duplicate PR we can merge the
your_feature_branchto themasterof Commcare. -
In order for us to test that your PR against
formplayerdoesn't break anything on Formplayer, we need to run formplayer side tests with your PR. To do this -- Check out a new branch say
test_cc_1189frommasterin Formplayer - Point the submodule in
libs/commcareto your CommCare Coreyour_feature_branch_dupebranch and push your formplayer branch -
- Check out a new branch say
cd libs/commcare
git fetch; git checkout your_feature_branch_dupe
cd ../..
git add libs/commcare
git commit -m "update submodule to 1189 head"
git push origin test_cc_1189
- Create a dummy test PR in Formplayer with a subject `[Test] CC 1189`.
- You don't need to add any reviewers here as this PR will be closed without merging and is only used to run Formplayer tests
- Go back to your CommCare Core
formplayerPR and addcross-request: link_to_formplayer_test_pras the last line in the PR description. This PR will now be owned by the Formplayer devs to decide whether any additional changes are required on Formplayer before merging this PR.