GitHub工作流

2018-08-21  本文已影响11人  _贺瑞丰

CONTRIBUTING

Workflow

We use GitHub issues with(out) milestones, PR, releases and a CHANGELOG.md to manage the development and releases in production.

Releases and Changelog

  1. Releases
    • We tag every release with a version number and update them on GitHub.
  2. Changelog
    • We sumarizes changes in CHANGELOG.md under the corresponding version.
    • A version with date means it's been released to production already.
    • A version without date means we're still working on it.
    • You should never add/edit changes under a version with date.

Issues and milestones

We always keep three milestones open:

For example, the current release on production is v1.3.1. So we'll have the three milestones open:

Issues without a mileston means we haven't schedule it yet.

Pull requests(PR)

  1. Start a new branch(keep the name short, simple, and meaningful) from:
    • master: For small changes or a simple feature we want to deploy it very soon.
    • a feature branch: For big changes or a complex feature which need to be tested thoroughly.
  2. Start coding and commiting. Remember rebase your working branch frequently from the base branch(master or the feature branch mentioned in 1.).
  3. Before submit your PR
    • Rebase from the base branch(in 1.).
    • Improve/Re-organize your commit history using interactive rebase(git rebase -i). Some tips:
      • Decide which changes should be in which commit(s) wisely.
      • Squash redundent commits such as Fix typo
      • Write a good commit message. Example format:
        Present-tense summary under 50 characters
        
        * More information about commit (under 72 characters).
        * More information about commit (under 72 characters).
        
        http://project.management-system.com/ticket/123
        
    • Make sure all tests are passed:
      • rails: (rails test and rails test:system)
  4. Submit your PR
    • One issue/change one pull request.
    • Put necessary details in your comment and reference the related issue.
  5. Ask person for a review:
    • Approval: your PR will be merged to the right branch.
    • Request changes: you should ammending your commits(or close the PR and start a new one) and repeat steps start with 3.
上一篇 下一篇

猜你喜欢

热点阅读