Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Have something you'd like to contribute to the framework? We welcome pull requests but ask that you carefully read this document first to understand how best to submit them; what kind of changes are likely to be accepted; and what to expect from the OpenHub Framework team when evaluating your submission.

...

If you're unsure why something isn't working or wondering if there is a better way of doing it please check on Stack Overflow first and if necessary start a discussion. This is the official OpenHub Framework tag. In short the issue tracker should be used to report issues and make feature requests.

...

Add Apache license header to all new classes

/*
 * Copyright 2002-2016 the original author or authors.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package ...;

Update Apache license header in modified files as necessary

Always check the date range in the license header. For example, if you've modified a file in 2015 whose header still reads:

/*
 * Copyright 2002-2011 the original author or authors.

Then be sure to update it to 2016 accordingly:

/*
 * Copyright 2002-2016 the original author or authors.

Use @since tags for newly-added public API types and methods

For example:

/**
 * ...
 *
 * @author First Last
 * @since 1.1
 * @see ...
 */

Prepare Your Commit

Submit JUnit test cases for all behavior changes

Search the codebase to find related tests and add additional @Test methods as appropriate. It is also acceptable to submit test cases on a per JIRA issue basis, for example:

package org.openhubframework.openhub.test;

/**
 * Unit tests for OHF-123.
 *
 * @author FirstName LastName
 */
public class Ohf123Tests {

    @Test
    public void cornerOhf123() {
        // ...
    }
}

Squash commits

Use git rebase --interactive --autosquashgit add --patch, and other tools to "squash" multiple commits into a single atomic commit. In addition to the man pages for git, there are many resources online to help you understand how these tools work. The Rewriting History section of Pro Git provides a good overview.

...

  1. Use imperative statements in the subject line, e.g. "Fix broken Javadoc link".
  2. Begin the subject line with a capitalized verb, e.g. "Add, Prune, Fix, Introduce, Avoid, etc."
  3. Do not end the subject line with a period.
  4. Restrict the subject line to 50 characters or less if possible.
  5. Wrap lines in the body at 72 characters or less.
  6. Mention associated JIRA issue(s) at the end of the commit comment, prefixed with "Issue: " as above.
  7. In the body of the commit message, explain how things worked before this commit, what has changed, and how things work now.

Examples of commit messages:


Code Block
languagexml
title#1
Clarification of contributing README
  
Added page to describe rules and principles how to contribute (https://openhubframework.atlassian.net/wiki/display/OHFV1/Rules+and+principles).
We strongly recommend discussing any serious submissions with the OpenHub Framework team prior to engaging in serious development work.
  
Issue: OHFJIRA-4


Code Block
languagexml
title#2
Laying the foundation stone of redesigned admin GUI
  
Created new maven module 'admin-console-client' as module that holds all web resources of OpenHub admin console.
A build is realised with frontend-plugin. Only basic structure is created under src/main/resources/META-INF/resources/.
Location of resources is created with regard to scalability and customisation of build.
 
- source root dir for web resources is src/main/resources/META-INF/resources/
  
Issue: OHFJIRA-4



Run the Final Checklist

Run all tests prior to submission

...