Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for "standard branches" #103

Closed
Reinmar opened this issue Mar 25, 2019 · 2 comments · Fixed by #105
Closed

Support for "standard branches" #103

Reinmar opened this issue Mar 25, 2019 · 2 comments · Fixed by #105
Assignees
Milestone

Comments

@Reinmar
Copy link
Member

Reinmar commented Mar 25, 2019

Currently, when you call mgit sync it uses the master branch in every repo, unless the repo's branch is defined in mgit.json.

It'd be useful if mgit could also use stable when the main repo is on stable. That would allow us to stop changing mgit.json on ckeditor5#stable which is inconvenient and leads to problems.

Theoretically, we could make mgit sync (and mgit co) use the current branch of the main repo in all cases where the branch is not defined in mgit.json. So, e.g. when ckeditor5 is on t/foo, all repos would be switched to t/foo. But I don't think that this would be that useful because unlike stable, the ticket branches are very rarely defined in all repos. Plus, if you don't need to change mgit.json why would you create t/foo in ckeditor5.

Therefore, I'd like to call this feature e.g. coreBranches and define it in mgit.json like this:

{
  "packages": "packages/",
  "packagesPrefix": "@ckeditor/ckeditor5-",
  "standardBranches": [ "master", "stable" ],
  "dependencies": {
    "@ckeditor/ckeditor5-adapter-ckfinder": "ckeditor/ckeditor5-adapter-ckfinder",
    "@ckeditor/ckeditor5-alignment": "ckeditor/ckeditor5-alignment",
    "@ckeditor/ckeditor5-autoformat": "ckeditor/ckeditor5-autoformat",
    "@ckeditor/ckeditor5-autosave": "ckeditor/ckeditor5-autosave",
    "@ckeditor/ckeditor5-basic-styles": "ckeditor/ckeditor5-basic-styles",
    "@ckeditor/ckeditor5-block-quote": "ckeditor/ckeditor5-block-quote",
    "@ckeditor/ckeditor5-build-balloon": "ckeditor/ckeditor5-build-balloon",
    ...
  }
}
@Reinmar Reinmar added this to the next milestone Mar 25, 2019
@pomek
Copy link
Member

pomek commented Mar 25, 2019

What in case if one of dependency has defined custom branch in mgit.json?

@Reinmar
Copy link
Member Author

Reinmar commented Mar 25, 2019

It'd switch to that branch. The algorithm that I'm proposing would work like this:

  1. Check if branch is defined in mgit.json. Use it if is.
  2. Check if the main repo is on one of std branches. If yes, use that branch.
  3. Use master otherwise.

@pomek pomek self-assigned this Jul 11, 2019
Reinmar added a commit that referenced this issue Jul 15, 2019
Feature: Support for base branches. Closes #103.
@Reinmar Reinmar modified the milestones: next, iteration 26 Jul 15, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants