- Steps for working on a topic
- GitHub - Prepare Final Pull Request
- GitHub - Create Final Pull Request
- GitHub - Change Final Pull Request
- GitHub - After Pull Request Got Merged
- Excursus: Git
This presents the tool chain used for creating and updating a pull request on GitHub.
For the general setup, please go to Eclipse Winery Toolchain.
Main idea: Separate branch for each topic (fix a bug, add functionality) and accordingly named. See https://guides.github.com/introduction/flow/index.html for more information.
- Sync with latest changes on upstream (especially main branch):
git fetch upstream --prune
. - Create branch based on
upstream/main
and make it known publicly:git checkout upstream/main
git checkout -b [name]
Branch naming patterns:- Bugfix:
fix/SHORT-TITLE
, e.g.,fix/deletion-of-namespaces
- Feature:
feature/SHORT-TITLE
, e.g.,feature/drag-and-drop-for-bpmn4tosca
- Thesis:
thesis/SHORT-THESIS-TITLE
. ReplaceSHORT-THESIS-TITLE
with something meaningful, e.g.,thesis/versioning
- EnPro: prefix
fix
orfeature
(see above) withenpro/
, e.g.,enpro/fix/policy-rendering
- StuPro: prefix
fix
orfeature
(see below) withstupro/
, e.g.,stupro/feature/github-oauth
- Bugfix:
git push --set-upstream origin [name]
- Do you your fist commit. Don't forget to sign-off the commit (Ctrl+S in Git Gui).
- Push the changes to origin:
git push
. - Create [WIP] Pull Request.
- Go to https://github.com/opentosca/winery 🡒 Pull Request
- Change the "base branch" to OpenTOSCA/winery
- Fill in the title of the Pull Request following the pattern
[WIP] Title of the thesis/work/target
- Fill in the provided description form
- Add
[x]
to the items listed in the write field - Check the description in the Preview and send the Pull Request
- There are automatic checks in place
- If there is a red cross, click in respective "Details" and fix them
You keep working and discuss with your supervisor how things go.
After each working day, do the following:
- Commit. Don't forget to sign the commit (Ctrl+S in Git Gui).
git push
- Keep your branch updated with
upstream/main
:git fetch upstream
git merge upstream/main
- Resolve conflicts - if there are some. See https://www.jetbrains.com/help/idea/resolving-conflicts.html for a documentation when using IntellIJ.
git push
The aim of these steps to have a single commit. This is required by the Eclipse process for checking for intellectual property (IP process for short).
Before commencing these steps, check with your supervisor
- http://wiki.eclipse.org/Development_Resources/Contributing_via_Git 🡒 Create an account WITH THE SAME EMAIL AS USED FOR THE COMMITS (can also be checked in gitk)
- Sign the Contributor Agreement electronically
git fetch upstream
- fetches all updates from https://github.com/eclipse/winery ("upstream") to the local git storagegit merge upstream/main
- merges all updates from upstream to the local branch- (Resolve merge conflicts) - required if there are conflicting changes
- Commit & Push with signed commit message (Ctrl+S in Git Gui) - this ensures that you have the changes backuped in case something goes wrong at the next steps
git reset upstream/main
- this prepares that all commits can be squashed together: The local checkout ("working tree") is left untouched, but the "pointer" of the current branch is reset toupstream/main
. Now, Git Gui shows the difference betweenupstream/main
and your changes.- Check changes in Git Gui:
- Each change you wanted: Is it recognized?
- At each file: Is the copyright information in the header OK?
- Check if you are listed in the NOTICE file as a contributor with the correct year
- Are there too much changed lines? 🡒 Do not stage spurious lines to the commit (e.g., tab to spaces, ...)
- Are there too much changed files? 🡒 Do not stage files you did not intend to change (e.g.,
build.gradle
if you did not touchbuild.gradle
at all) - Check again the style (!)
- (Don't forget RESCAN to see the current changes)
- Add description as new markdown file to to
docs/index.md
(if helpful) - Press "Stage to Commit" 🡒 all changes are staged to Commit
- Sign the Commit Message (Ctrl+S in Git Gui)
- In the case of multiple authors: Add each additional author with
Co-authored-by
. See also in the Eclipse Handbook.
Example:Co-authored-by: Some Bodyelse <somebodyelse@nowhere.com> Signed-off-by: Some Body <somebody@somewhere.com>
- Commit & Push with "force overwrite" since you changed the branch:
git push -f
Attention: Commits on the same branch done after the Pull Request is sent are still part of the Pull Request (!)
- Go to https://github.com/eclipse/winery 🡒 Pull Request
- Fill in the title of the Pull Request and give a more detailed description of the changes or added functionality
- In case of UI changes: Add screenshots
- Add
[x]
to the items listed in the write field - Check the description in the Preview and send the Pull Request
- Close your Pull Request at OpenTOSCA/winery with a comment referencing the full URL of the new Pull Request, e.g.
Follow up at https://github.com/eclipse/winery/pull/212
.
-
If there is a red cross, click in respective "Details" and fix them
-
In case of missing code quality, ... changes are requested by a committer (person controlling the pull request process)
-
FOR WINERY THE FOLLOWING APPLIES:
- Open Git Gui
- Make requested changes in your code (don't forget to RESCAN)
- Commit
- Push
- Wait for a second review
- In case everything is fine, squash the commits into one.
See GitHub - Prepare Pull Request.
Then, do a force push (
git push -f
).
- Delete the branch locally.
- The branch on origin (https://github.com/OpenTOSCA/winery) is deleted by the maintainer having done the merge.
Please see also use gitk to understand git to understand the settings in git.