{"id":35253771,"url":"https://github.com/dimagi/staging-branches","last_synced_at":"2026-03-27T04:09:00.718Z","repository":{"id":153589736,"uuid":"613482093","full_name":"dimagi/staging-branches","owner":"dimagi","description":null,"archived":false,"fork":false,"pushed_at":"2026-03-19T21:48:50.000Z","size":3636,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":17,"default_branch":"main","last_synced_at":"2026-03-20T10:30:38.163Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dimagi.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2023-03-13T16:49:01.000Z","updated_at":"2026-03-19T21:48:50.000Z","dependencies_parsed_at":null,"dependency_job_id":"d3b0b719-5865-4108-8224-6aa7e0f670ac","html_url":"https://github.com/dimagi/staging-branches","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/dimagi/staging-branches","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dimagi%2Fstaging-branches","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dimagi%2Fstaging-branches/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dimagi%2Fstaging-branches/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dimagi%2Fstaging-branches/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dimagi","download_url":"https://codeload.github.com/dimagi/staging-branches/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dimagi%2Fstaging-branches/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31018555,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-27T03:51:26.850Z","status":"ssl_error","status_checked_at":"2026-03-27T03:51:09.693Z","response_time":164,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-12-30T07:31:56.420Z","updated_at":"2026-03-27T04:09:00.713Z","avatar_url":"https://github.com/dimagi.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# staging-branches\n\n`staging-branches` is a repo hosting the branches configuration for [commcare-hq](https://github.com/dimagi/commcare-hq/)'s and [formplayer](https://github.com/dimagi/formplayer)'s staging environments.\n\n## Workflow\n\nThe general workflow is virtually the same across repositories. The convention is for a script named `rebuildstaging` to live in the project's `scripts` directory (e.g., `commcare-hq/scripts/rebuildstaging`) which is responsible for fetching the appropriate file from this repository, and building a branch to deploy to the staging environment. \n\n* Add the branch you'd like to deploy to the appropriate staging configuration file in this repository. The easiest approach is to use the GitHub UI for editing the file directly, but you can choose to edit locally if so desired.\n* Commit your changes directly to main.  Don't worry about a detailed commit message unless you're doing something unusual.\n* From the root of the repository you want to deploy (e.g., commcare-hq, formplayer, etc), run `./scripts/rebuildstaging`.  This will build a branch called `autostaging` that contains all branches specified in this file.\n  * To check if your newly added branch causes any conflicts before pushing to autostaging, run:\n    ```\n    $ scripts/rebuildstaging --no-push\n    ```\n* After rebuilding the autostaging branch, you need to deploy the new branch to staging.\n  ```\n  $ commcare-cloud --control staging deploy\n  ##### OR #####\n  $ scripts/rebuildstaging --deploy (NOTE: `commcare-cloud` must be available in your shell)\n  ```\n\n## Resolving Branch Conflicts\n\nFirst, determine where the conflict lies.  All of these steps should be taken from the root of the repository you're working on (eg, `commcare-hq`)\n\n#### Branch `foo` conflicts with `master`\n\n```\n$ git checkout -b foo origin/foo\n$ git pull origin master\n```\ntry to resolve conflict\n```\n$ git push origin foo\n```\n\n#### Branch `foo` conflicts with branch `bar`\n\nYou can't just merge foo into bar or vice versa, otherwise the PR\nfor foo will contain commits from bar.  Instead make a third,\nconflict-resolution branch:\n```\n$ git checkout -b foo+bar --no-track origin/foo\n$ git pull origin bar\n```\ntry to resolve conflict\n```\n$ git push origin foo+bar\n```\nadd the branch `foo+bar` to staging.yml and move branches foo and\nbar to right below it:\n```\n- foo+bar\n- foo\n- bar\n```\n\nLater on branch `bar` gets merged into master and removed from staging.yml.\nPerhaps the person who removes it also notices the `foo+bar` and does the\nfollowing. Otherwise anyone who comes along and sees `foo+bar` but not both\nbranches can feel free to assume the following needs to be done:\n  * Merge `foo+bar` into `foo`. Since `bar` is now merged and deleted,\n    you want to merge the resolution into `foo`, otherwise `foo` will conflict\n    with master.\n  * Remove `foo+bar` from staging.yml. It's no longer necessary since it's\n    now a subset of `foo`.\n\nIf you are unsure of how to resolve a conflict, notify the branch owner.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdimagi%2Fstaging-branches","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdimagi%2Fstaging-branches","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdimagi%2Fstaging-branches/lists"}