DevHowTo - TypeCobolTeam/TypeCobol GitHub Wiki

Prerequisites

Our project is hosted on GitHub. GitHub is a glorified front-end to a source control repository called Git. So, there are a few things you should know:

If you're okay with that, cheers! Here, take this cute cheat sheet so we keep everything in mind, and we shall begin!

If you are interested in contributing to the TypeCobol project, but you don't belong to the TypeCobolTeam organization, you have to use Github pull requests feature. This is how it works for our project:

  1. Create an issue describing what you want to do or use an existing issue. Discussion ensues.
  2. Fork the TypeCobol Repository.
  3. Hack the code as desired. Altough it is not mandatory, we suggest you do it in a branch of your repository: this allows you to work on different features inside a given repository. Don't forget to implement unit tests!
  4. Open a pull request against the develop branch
  5. Your pull request will then be analyzed by TypeCobol Team members at the earliest opportunity.
  • Code is reviewed by at least 1 person and 2 different roles:
    • A C# developer
    • A Cobol developer
  • Big PR which changes a lot of fundemantal aspects must be reviewed by all C# developers
  • By default all active TypeCobol developers will review the PR
  • A reviewer can remove itself from a PR if he feels that he's no added value.
  1. If your modification is all good, a TypeCobol Team member will Merge your pull request.

And if my pull request is not good ?

Discussion between you and the TypeCobolTeam members will ensue. This discussion can happen either:

We will hopefuly be able to solve together the points preventing your pull request to be merged as is. That's how social programming works!

Best case scenario

If your PR can be merged with our master's HEAD without any conflict, you will directly appear in the repository commits history. There will be a "merge commit" by the TypeCobolTeam member who analysed your pull request, but the commit(s) grouped in your pull request will be yours.

In practice, that's how we do it:

git checkout -b <local branch> master
git pull --no-ff <url of your fork> <branch of your PR>
git rebase master
git checkout master
git merge --no-ff <local branch>
git push
git branch -D <local branch>

And this is how it will look like: Easy merge screenshot laurentprudhon's pull request could be merged without any conflict by wiztigers.

Worst case scenario

If your pull request cannot be merged "as is" because of conflicts between our develop's HEAD and the code proposed by your pull request, we'll have corrections to do. In many cases, this will mean solve conflicts in a way that prevents your original commits to be kept untouched.

That's why it is always better that you make sure your pull request can be merged in our develop without any conflict.

Rebase

If the commits of your PR contains a lot of noise, we may ask you to create a new PR with a rewritten history. See commits guidelines

One of our main goals is to make TypeCobol extensible, so any user can provide its own features or behaviours without the need to modify the core software. However there might be cases when this is not possible. We can then have a discussion about how TypeCobol can solve your problem.

Some leads we can follow:

  • You are visibly missing an extension point. After all, would this extension point implemented, your feature wouldn't be blocked. So, let's think together about what is the best way to provide you the extensibility you need. Once properly specified and implemented, this extension point will benefit everyone.
  • Is your feature as specific as it seems? We'd like to implement as few user specific features as possible. However, maybe what you have in mind can be abstracted/generalized in a way that will profit to as many people as possible, and not only you?
  • We always have the last resort possibility: you have the source code, so you can always clone our repository, patch the source code yourself and roll with your own custom TypeCobol application: our License allows it!
⚠️ **GitHub.com Fallback** ⚠️