Skip to content

Official commiter memo

Didier Vojtisek edited this page Jan 10, 2022 · 16 revisions

Useful tip and tricks for contributors who are officially commiter in the projet.

Communication

Make sure to have subscribed to the developer mailing list ( gemoc-dev@eclipse.org) in order to contact all the other contributors (including official commiters) and discuss technical points.

Contributing code

  • Create a branch for each or your main contributions (this will allow to test it in the CI

  • Make sure that every commit you propose has the Signed-off-by information in the comment

    This can be enforced automatically in eclipse by setting the preferences (in Team>Git>Committing tick the "insert Signed-off-by" check box).

  • Open a Pull Request for your contribution. (This will allow to discuss and validate the contribution) (ideally, add a comment in the PR linking to the CI job that was created for this branch)

  • Once the PR has been accepted, consider removing the branch.

Integrating contributor code

Integrating PR coming from other official commiters (ie. a branch in the official repo)

If possible, you are not supposed to accept you own pull request if it hasn't been approved.

The CI can be used to get some validation if the contribution has been pushed in a dedicated branch. so other official commiter's contributions should have a dedicated branch.

Integrating PR coming from forked repo

example: in the following I consider a branch named prepare_v2.4.0 on dvojtise's repository

  • In github UI , see the "command line instruction to check out and test the changes"

  • Step 1: From your project repository, check out a new branch and test the changes.

git checkout -b dvojtise-prepare_v2.4.0 master
git pull https://github.com/dvojtise/gemoc-studio.git prepare_v2.4.0
  • Step 2 : Check locally by merging of rebasing the changes Merge the changes from master in the test branch
git merge --no-ff master
  • Step 2 bis (optionnal): this can also be tested on the eclipse CI by pushing this to a new branch on eclipse repository
git push -u origin dvojtise-prepare_v2.4.0

(ideally, add a comment in the PR linking to the CI job that was created for this branch)

optionnaly force a "scan Multibranch Pipeline Now" build on the CI https://ci.eclipse.org/gemoc/job/gemoc-studio/

Note: if some changes are done on the forked repo, make them available to the CI using:

git pull https://github.com/dvojtise/gemoc-studio.git prepare_v2.4.0
  • Once verified and approved, use github UI (or command line instruction) to accept the change (either merge, rebase or squash depending on the history you want to provide)
  • Once PR has been merged in master, then remove the temp branch created in Step 2 bis in github (ie. dvojtise-prepare_v2.4.0 in this example)

Create new release/milestone

  • Verify that the CI is building without error on master branch
  • tag and push tag for release/milestone each repository
    • ex: 3.0.0-rc3
  • make sure that all PR have labels and correct titles
  • Use gren to create github prerelease (first create the release for 3.0.0-rc3, then update it in order to take into account only the PR since 3.0.0-rc2)
export GREN_GITHUB_TOKEN=your_token_here
cd gemoc-studio
gren release -P --tags=3.0.0-rc3
gren release -P --override --tags=3.0.0-rc3..3.0.0-rc2
cd ../gemoc-studio-modeldebugging
gren release -P --tags=3.0.0-rc3
gren release -P --override --tags=3.0.0-rc3..3.0.0-rc2
cd ..

(the option --tags allow to ignore intermediate tags) (the option -P is for prerelease) ex: for a release

gren release --override --tags=3.2.0..3.1.0
  • update CHANGELOG.md at the root of each git repository (using gren). and add it to the tag
cd gemoc-studio
gren changelog --override
git commit -m "update changelog" CHANGELOG.md
git push
git tag -f -a 3.0.0-rc3 -m "milestone 3.0.0-rc3"
git push -f --tags
cd ../gemoc-studio-modeldebugging
gren changelog --override
git commit -m "update changelog" CHANGELOG.md
git push
git tag -f -a 3.0.0-rc3 -m "milestone 3.0.0-rc3"
git push -f --tags
cd ..