Skip to content

Update CONTRIBUTING for GH issues bug tracking #2696

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

Merged
merged 2 commits into from
Jan 14, 2019
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
111 changes: 48 additions & 63 deletions CONTRIBUTING.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -7,28 +7,27 @@ what kind of changes are likely to be accepted; and what to expect from the Spri
Please refer back to this document as a checklist before issuing any pull request; this will save time for everyone!

== Code of Conduct

This project adheres to the Contributor Covenant link:CODE_OF_CONDUCT.adoc[code of conduct].
By participating, you are expected to uphold this code. Please report unacceptable behavior to
[email protected].
By participating, you are expected to uphold this code. Please report unacceptable behavior to [email protected].

== Understand the basics

Not sure what a *pull request* is, or how to submit one? Take a look at GitHub's excellent documentation:
https://help.github.com/articles/using-pull-requests/[Using Pull Requests] first.
Not sure what a *pull request* is, or how to submit one?
Take a look at GitHub's excellent documentation: https://help.github.com/articles/using-pull-requests/[Using Pull Requests] first.

== Search JIRA first; create an issue if necessary
== Search GitHub issues first; create one if necessary

Is there already an issue that addresses your concern? Search the
https://jira.springsource.org/browse/INT[JIRA issue tracker] to see if you can find something similar.
If not, please create a new issue before submitting a pull request unless the change is truly trivial, e.g. typo fixes,
removing compiler warnings, etc.
Is there already an issue that addresses your concern?
Search the https://github.com/spring-projects/spring-integration/issues[GitHub issue tracker] to see if you can find something similar.
If not, please create a new issue before submitting a pull request unless the change is truly trivial, e.g. typo fixes, removing compiler warnings, etc.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't we still ask them to search JIRA too (since we're not planning on migrating)?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah... Make sense. Will mention that, too

== Sign the contributor license agreement

If you have not previously done so, please fill out and
submit the https://cla.pivotal.io/sign/spring[Contributor License Agreement (CLA)].
If you have not previously done so, please fill out and submit the https://cla.pivotal.io/sign/spring[Contributor License Agreement (CLA)].

Very important, before we can accept any *Spring Integration contributions*, we will need you to sign the CLA. Signing the CLA does not grant anyone commit rights to the main repository, but it does mean that we can accept your contributions, and you will get an author credit if we do.
Very important, before we can accept any *Spring Integration contributions*, we will need you to sign the CLA.
Signing the CLA does not grant anyone commit rights to the main repository, but it does mean that we can accept your contributions, and you will get an author credit if we do.

== Fork the Repository

Expand All @@ -47,57 +46,46 @@ _you should see only 'origin' - which is the fork you created for your own githu
_you should now see 'upstream' in addition to 'origin' where 'upstream' is the SpringSource repository from which releases are built_
6. `git fetch --all`
7. `git branch -a`
_you should see branches on origin as well as upstream, including 'master' and 'maint'_
_you should see branches on origin as well as upstream, including 'master'_

== A Day in the Life of a Contributor

* _Always_ work on topic branches (Typically use the Jira ticket ID as the branch name).
- For example, to create and switch to a new branch for issue INT-123: `git checkout -b INT-123`
* _Always_ work on topic branches (Typically use the GitHub issue ID as the branch name).
- For example, to create and switch to a new branch for issue 123: `git checkout -b GH-123`
* You might be working on several different topic branches at any given time, but when at a stopping point for one of those branches, commit (a local operation).
* Please follow the "Commit Guidelines" described in
http://git-scm.com/book/en/Distributed-Git-Contributing-to-a-Project[this chapter of Pro Git].
* Then to begin working on another issue (say INT-101): `git checkout INT-101`. The _-b_ flag is not needed if that
branch already exists in your local repository.
* When ready to resolve an issue or to collaborate with others, you can push your branch to origin (your fork),
e.g.: `git push origin INT-123`
* If you want to collaborate with another contributor, have them fork your repository (add it as a remote) and
`git fetch <your-username>` to grab your branch.
* Please follow the "Commit Guidelines" described in http://git-scm.com/book/en/Distributed-Git-Contributing-to-a-Project[this chapter of Pro Git].
* Then to begin working on another issue (say 101): `git checkout GH-101`.
The _-b_ flag is not needed if that branch already exists in your local repository.
* When ready to resolve an issue or to collaborate with others, you can push your branch to origin (your fork), e.g.: `git push origin GH-123`
* If you want to collaborate with another contributor, have them fork your repository (add it as a remote) and `git fetch <your-username>` to grab your branch.
Alternatively, they can use `git fetch --all` to sync their local state with all of their remotes.
* If you grant that collaborator push access to your repository, they can even apply their changes to your branch.
* When ready for your contribution to be reviewed for potential inclusion in the master branch of the canonical
spring-integration repository (what you know as 'upstream'), issue a pull request to the SpringSource repository
(for more detail, see https://help.github.com/articles/using-pull-requests/[Using pull requests]).
* The project lead may merge your changes into the upstream master branch as-is, he may keep the pull request open yet
add a comment about something that should be modified, or he might reject the pull request by closing it.
* When ready for your contribution to be reviewed for potential inclusion in the master branch of the canonical `spring-integration` repository (what you know as 'upstream'), issue a pull request to the SpringSource repository (for more detail, see https://help.github.com/articles/using-pull-requests/[Using pull requests]).
* The project lead may merge your changes into the upstream master branch as-is, he may keep the pull request open yet add a comment about something that should be modified, or he might reject the pull request by closing it.
* A prerequisite for any pull request is that it will be cleanly merge-able with the upstream master's current state.
**This is the responsibility of any contributor.**
If your pull request cannot be applied cleanly, the project lead will most likely add a comment requesting that you make
it merge-able.
If your pull request cannot be applied cleanly, the project lead will most likely add a comment requesting that you make it merge-able.
For a full explanation, see http://git-scm.com/book/en/Git-Branching-Rebasing[the Pro Git section on rebasing].
As stated there: _"> Often, you’ll do this to make sure your commits apply cleanly on a remote branch — perhaps in a
project to which you’re trying to contribute but that you don’t maintain."_
As stated there: _"> Often, you’ll do this to make sure your commits apply cleanly on a remote branch — perhaps in a project to which you’re trying to contribute but that you don’t maintain."_

== Keeping your Local Code in Sync
* As mentioned above, you should always work on topic branches (since 'master' is a moving target). However, you do want
to always keep your own 'origin' master branch in synch with the 'upstream' master.

* As mentioned above, you should always work on topic branches (since 'master' is a moving target). However, you do want to always keep your own 'origin' master branch in synch with the 'upstream' master.
* Within your local working directory, you can sync up all remotes' branches with: `git fetch --all`
* While on your own local master branch: `git pull upstream master` (which is the equivalent of fetching upstream/master
and merging that into the branch you are in currently)
* Now that you're in synch, switch to the topic branch where you plan to work, e.g.: `git checkout -b INT-123`
* While on your own local master branch: `git pull upstream master` (which is the equivalent of fetching upstream/master and merging that into the branch you are in currently)
* Now that you're in synch, switch to the topic branch where you plan to work, e.g.: `git checkout -b GH-123`
* When you get to a stopping point: `git commit`
* If changes have occurred on the upstream/master while you were working you can synch again:
* If changes have occurred on the upstream/master while you were working you can sync again:
- Switch back to master: `git checkout master`
- Then: `git pull upstream master`
- Switch back to the topic branch: `git checkout INT-123` (no -b needed since the branch already exists)
- Rebase the topic branch to minimize the distance between it and your recently synched master branch: `git rebase master`
- Switch back to the topic branch: `git checkout GH-123` (no -b needed since the branch already exists)
- Rebase the topic branch to minimize the distance between it and your recently synced master branch: `git rebase master`
(Again, for more detail see http://git-scm.com/book/en/Git-Branching-Rebasing[the Pro Git section on rebasing]).
* **Note** While it is generally recommended to __not__ re-write history by using `push --force`, and we do not do this on `master` (and release) branches in the main repo, we require topic branches for pull requests to be rebased before merging, in order to maintain a clean timeline and avoid "merge" commits.
* If, while rebasing for the merge, we find significant conflicts, we may ask you to rebase and `push --force` to your topic branch after resolving the conflicts.
* Assuming your pull request is merged into the 'upstream' master, you will end up pulling that change into
your own master eventually and, at that time, you may decide to delete the topic branch from your local repository and
your fork (origin) if you pushed it there.
- to delete the local branch: `git branch -d INT-123`
- to delete the branch from your origin: `git push origin :INT-123`
* Assuming your pull request is merged into the 'upstream' master, you will end up pulling that change into your own master eventually and, at that time, you may decide to delete the topic branch from your local repository and your fork (origin) if you pushed it there.
- to delete the local branch: `git branch -d GH-123`
- to delete the branch from your origin: `git push origin :GH-123`

== Maintain a linear commit history

Expand All @@ -118,11 +106,11 @@ git config --global alias.logg 'log --graph --pretty=oneline'
This command, will provide the following output, which in this case shows a nice linear history:

----
* c129a02e6c752b49bacd4a445092a44f66c2a1e9 INT-2721 Increase Timers on JDBC Delayer Tests
* 14e556ce23d49229c420632cef608630b1d82e7d INT-2620 Fix Debug Log
* 6140aa7b2cfb6ae309c55a157e94b44e5d0bea4f INT-3037 Fix JDBC MS Discard After Completion
* c129a02e6c752b49bacd4a445092a44f66c2a1e9 GH-2721 Increase Timers on JDBC Delayer Tests
* 14e556ce23d49229c420632cef608630b1d82e7d GH-2620 Fix Debug Log
* 6140aa7b2cfb6ae309c55a157e94b44e5d0bea4f GH-3037 Fix JDBC MS Discard After Completion
* 077f2b24ea871a3937c513e08241d1c6cb9c9179 Update Spring Social Twitter to 1.0.5
* 6d4f2b46d859c903881a561c35aa28df68f8faf3 INT-3053 Allow task-executor on <reply-listener/>
* 6d4f2b46d859c903881a561c35aa28df68f8faf3 GH-3053 Allow task-executor on <reply-listener/>
* 56f9581b85a8a40bbcf2461ffc0753212669a68d Update Spring Social Twitter version to 1.0.4
----

Expand Down Expand Up @@ -165,7 +153,7 @@ Use `@author` tag with your real name, when you change any class e.g.
== Submit JUnit test cases for all behavior changes

Search the codebase to find related unit tests and add additional `@Test` methods within.
It is also acceptable to submit test cases on a per JIRA issue basis.
It is also acceptable to submit test cases on a per GH issue basis.

== Squash commits

Expand All @@ -174,11 +162,12 @@ In addition to the man pages for git, there are many resources online to help yo

== Use your real name in git commits

Please configure git to use your real first and last name for any commits you intend to submit as pull requests. For example, this is not acceptable:
Please configure git to use your real first and last name for any commits you intend to submit as pull requests.
For example, this is not acceptable:

Author: Nickname <[email protected]>

Rather, please include your first and last name, properly capitalized, as submitted against the SpringSource contributor license agreement:
Rather, please include your first and last name, properly capitalized, as submitted against the SpringIO contributor license agreement:

Author: First Last <[email protected]>

Expand All @@ -197,23 +186,17 @@ or locally for the *spring-integration* repository only by omitting the '--globa

== Run all tests prior to submission

See the https://github.com/spring-projects/spring-integration#checking-out-and-building[checking out and building]
section of the README for instructions.
See the https://github.com/spring-projects/spring-integration#checking-out-and-building[checking out and building] section of the README for instructions.
Make sure that all tests pass prior to submitting your pull request.

== Mention your pull request on the associated JIRA issue

Add a comment to the associated JIRA issue(s) linking to your new pull request.
== Provide a Link to the GitHub issue in the Associated Pull Request

== Provide a Link to the JIRA issue in the Associated Pull Request

Add a JIRA issue link to your first commit comment of the pull request on the last line, so your commit message
may look like this:
Add a GitHub issue link to your first commit comment of the pull request on the last line, so your commit message may look like this:

----
INT-1639: Add <spel-function> support
GH-1639: Add <spel-function> support

JIRA: https://jira.springsource.org/browse/INT-1639
Fixes spring-projects/spring-integration#1639

* add `<spel-function>` XSD element
* add `SpelFunctionParser`
Expand All @@ -222,3 +205,5 @@ may look like this:
* some refactoring for `IntegrationEvaluationContextFactoryBean`
* polishing some failed tests after this change
----

Please, follow Chris Beams' recommendations in regards to the good commit message: https://chris.beams.io/posts/git-commit[How to Write a Git Commit Message].