You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by ol...@apache.org on 2012/06/22 11:55:34 UTC

svn commit: r1352825 - in /maven/plugins/trunk/maven-changes-plugin: ./ src/main/java/org/apache/maven/plugin/github/ src/main/resources/ src/site/ src/site/apt/ src/site/apt/examples/

Author: olamy
Date: Fri Jun 22 09:55:33 2012
New Revision: 1352825

URL: http://svn.apache.org/viewvc?rev=1352825&view=rev
Log:
[MCHANGES-283] Add GitHub reporter
Submitted by Bryan Baugher.

Added:
    maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/github/
    maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/github/GitHubDownloader.java   (with props)
    maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/github/GitHubIssueManagementSystem.java   (with props)
    maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/github/GitHubMojo.java   (with props)
    maven/plugins/trunk/maven-changes-plugin/src/main/resources/github-report.properties   (with props)
    maven/plugins/trunk/maven-changes-plugin/src/main/resources/github-report_en.properties   (with props)
    maven/plugins/trunk/maven-changes-plugin/src/site/apt/examples/configuring-github-report.apt.vm   (with props)
Modified:
    maven/plugins/trunk/maven-changes-plugin/pom.xml
    maven/plugins/trunk/maven-changes-plugin/src/site/apt/index.apt
    maven/plugins/trunk/maven-changes-plugin/src/site/apt/usage.apt.vm
    maven/plugins/trunk/maven-changes-plugin/src/site/site.xml

Modified: maven/plugins/trunk/maven-changes-plugin/pom.xml
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-changes-plugin/pom.xml?rev=1352825&r1=1352824&r2=1352825&view=diff
==============================================================================
--- maven/plugins/trunk/maven-changes-plugin/pom.xml (original)
+++ maven/plugins/trunk/maven-changes-plugin/pom.xml Fri Jun 22 09:55:33 2012
@@ -302,6 +302,23 @@ under the License.
       <artifactId>xmlrpc-client</artifactId>
       <version>3.0</version>
     </dependency>
+    
+    <!-- github dependencies -->
+    <dependency>
+      <groupId>org.eclipse.mylyn.github</groupId>
+      <artifactId>org.eclipse.egit.github.core</artifactId>
+      <version>1.2.0</version>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.httpcomponents</groupId>
+      <artifactId>httpcore</artifactId>
+      <version>4.1.2</version>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.httpcomponents</groupId>
+      <artifactId>httpclient</artifactId>
+      <version>4.1.2</version>
+    </dependency>
 
     <!-- test dependencies -->
     <dependency>

Added: maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/github/GitHubDownloader.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/github/GitHubDownloader.java?rev=1352825&view=auto
==============================================================================
--- maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/github/GitHubDownloader.java (added)
+++ maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/github/GitHubDownloader.java Fri Jun 22 09:55:33 2012
@@ -0,0 +1,210 @@
+package org.apache.maven.plugin.github;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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.
+ */
+
+import org.apache.maven.plugin.issues.Issue;
+import org.apache.maven.project.MavenProject;
+import org.eclipse.egit.github.core.Label;
+import org.eclipse.egit.github.core.client.GitHubClient;
+import org.eclipse.egit.github.core.service.IssueService;
+
+import java.io.IOException;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @since 2.8
+ */
+public class GitHubDownloader
+{
+
+    /**
+     * The github client.
+     */
+    private GitHubClient client;
+
+    /**
+     * A boolean to indicate if we should include open issues as well
+     */
+    private boolean includeOpenIssues;
+
+    /**
+     * A boolean to indicate if we should only include issues with milestones
+     */
+    private boolean onlyMilestoneIssues;
+
+    /**
+     * The owner/organization of the github repo.
+     */
+    private String githubOwner;
+
+    /**
+     * The name of the github repo.
+     */
+    private String githubRepo;
+
+    /**
+     * The url to the github repo's issue management
+     */
+    private String githubIssueURL;
+
+    public GitHubDownloader( MavenProject project, String githubScheme, int githubPort, boolean includeOpenIssues,
+                             boolean onlyMilestoneIssues )
+        throws MalformedURLException
+    {
+        this.includeOpenIssues = includeOpenIssues;
+        this.onlyMilestoneIssues = onlyMilestoneIssues;
+
+        URL githubURL = new URL( project.getIssueManagement().getUrl() );
+
+        // The githubclient prefers to connect to 'github.com' using the api domain, unlike github enterprise
+        // which can connect fine using its domain, so for github.com use empty constructor
+        if ( githubURL.getHost().equalsIgnoreCase( "github.com" ) )
+        {
+            this.client = new GitHubClient();
+        }
+        else
+        {
+            this.client = new GitHubClient( githubURL.getHost(), githubPort, githubScheme );
+        }
+
+        this.githubIssueURL = project.getIssueManagement().getUrl();
+        if ( !this.githubIssueURL.endsWith( "/" ) )
+        {
+            this.githubIssueURL = this.githubIssueURL + "/";
+        }
+
+        String urlPath = githubURL.getPath();
+        if ( urlPath.startsWith( "/" ) )
+        {
+            urlPath = urlPath.substring( 1 );
+        }
+
+        if ( urlPath.endsWith( "/" ) )
+        {
+            urlPath = urlPath.substring( 0, urlPath.length() - 2 );
+        }
+
+        String[] urlPathParts = urlPath.split( "/" );
+
+        if ( urlPathParts.length != 3 )
+        {
+            throw new MalformedURLException(
+                "GitHub issue management URL must look like, [GITHUB_DOMAIN]/[OWNER]/[REPO]/issues" );
+        }
+
+        this.githubOwner = urlPathParts[0];
+        this.githubRepo = urlPathParts[1];
+    }
+
+    private Issue createIssue( org.eclipse.egit.github.core.Issue githubIssue )
+    {
+        Issue issue = new Issue();
+
+        issue.setId( String.valueOf( githubIssue.getNumber() ) );
+
+        issue.setLink( this.githubIssueURL + githubIssue.getNumber() );
+
+        issue.setCreated( githubIssue.getCreatedAt() );
+
+        issue.setUpdated( githubIssue.getUpdatedAt() );
+
+        if ( githubIssue.getAssignee() != null )
+        {
+            if ( githubIssue.getAssignee().getName() != null )
+            {
+                issue.setAssignee( githubIssue.getAssignee().getName() );
+            }
+            else
+            {
+                issue.setAssignee( githubIssue.getAssignee().getLogin() );
+            }
+        }
+
+        issue.setTitle( githubIssue.getTitle() );
+
+        issue.setSummary( githubIssue.getTitle() );
+
+        if ( githubIssue.getMilestone() != null )
+        {
+            issue.addFixVersion( githubIssue.getMilestone().getTitle() );
+        }
+
+        issue.setReporter( githubIssue.getUser().getLogin() );
+
+        if ( githubIssue.getClosedAt() != null )
+        {
+            issue.setStatus( "closed" );
+        }
+        else
+        {
+            issue.setStatus( "open" );
+        }
+
+        List<Label> labels = githubIssue.getLabels();
+        if ( labels != null && !labels.isEmpty() )
+        {
+            issue.setType( labels.get( 0 ).getName() );
+        }
+
+        return issue;
+    }
+
+    public List<Issue> getIssueList()
+        throws IOException
+    {
+        List<Issue> issueList = new ArrayList<Issue>();
+
+        IssueService service = new IssueService( client );
+        Map<String, String> issueFilter = new HashMap<String, String>();
+
+        if ( includeOpenIssues )
+        {
+            // Adding open issues
+
+            for ( org.eclipse.egit.github.core.Issue issue : service.getIssues( githubOwner, githubRepo, issueFilter ) )
+            {
+                if ( !onlyMilestoneIssues || issue.getMilestone() != null )
+                {
+                    issueList.add( createIssue( issue ) );
+                }
+            }
+        }
+
+        // Adding closed issues
+
+        issueFilter.put( "state", "closed" );
+
+        for ( org.eclipse.egit.github.core.Issue issue : service.getIssues( githubOwner, githubRepo, issueFilter ) )
+        {
+            if ( !onlyMilestoneIssues || issue.getMilestone() != null )
+            {
+                issueList.add( createIssue( issue ) );
+            }
+        }
+
+        return issueList;
+    }
+
+}

Propchange: maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/github/GitHubDownloader.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/github/GitHubDownloader.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/github/GitHubIssueManagementSystem.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/github/GitHubIssueManagementSystem.java?rev=1352825&view=auto
==============================================================================
--- maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/github/GitHubIssueManagementSystem.java (added)
+++ maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/github/GitHubIssueManagementSystem.java Fri Jun 22 09:55:33 2012
@@ -0,0 +1,51 @@
+package org.apache.maven.plugin.github;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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.
+ */
+
+import org.apache.maven.plugin.changes.IssueType;
+import org.apache.maven.plugin.issues.AbstractIssueManagementSystem;
+
+/**
+ *
+ * @since 2.8
+ */
+public class GitHubIssueManagementSystem
+    extends AbstractIssueManagementSystem
+{
+
+    private static final String DEFAULT_ADD_TYPE = "enhancement";
+
+    private static final String DEFAULT_FIX_TYPE = "bug";
+
+    public GitHubIssueManagementSystem()
+    {
+        super();
+        // The standard issue types for GitHub
+        issueTypeMap.put( DEFAULT_ADD_TYPE, IssueType.ADD );
+        issueTypeMap.put( DEFAULT_FIX_TYPE, IssueType.FIX );
+    }
+
+    @Override
+    public String getName()
+    {
+        return "Github";
+    }
+
+}

Propchange: maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/github/GitHubIssueManagementSystem.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/github/GitHubIssueManagementSystem.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/github/GitHubMojo.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/github/GitHubMojo.java?rev=1352825&view=auto
==============================================================================
--- maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/github/GitHubMojo.java (added)
+++ maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/github/GitHubMojo.java Fri Jun 22 09:55:33 2012
@@ -0,0 +1,208 @@
+package org.apache.maven.plugin.github;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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.
+ */
+
+import org.apache.maven.plugin.changes.AbstractChangesReport;
+import org.apache.maven.plugin.changes.ProjectUtils;
+import org.apache.maven.plugin.issues.Issue;
+import org.apache.maven.plugin.issues.IssueUtils;
+import org.apache.maven.plugin.issues.IssuesReportGenerator;
+import org.apache.maven.plugin.issues.IssuesReportHelper;
+import org.apache.maven.reporting.MavenReportException;
+
+import java.net.MalformedURLException;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Locale;
+import java.util.Map;
+import java.util.ResourceBundle;
+
+/**
+ * Goal which downloads issues from GitHub and generates a
+ * report.
+ *
+ * @author Bryan Baugher
+ * @goal github-report
+ * @threadSafe
+ * @since 2.8
+ */
+public class GitHubMojo
+    extends AbstractChangesReport
+{
+
+    /**
+     * Valid Github columns.
+     */
+    private static Map<String, Integer> GITHUB_COLUMNS = new HashMap<String, Integer>();
+
+    static
+    {
+        GITHUB_COLUMNS.put( "Assignee", new Integer( IssuesReportHelper.COLUMN_ASSIGNEE ) );
+        GITHUB_COLUMNS.put( "Created", new Integer( IssuesReportHelper.COLUMN_CREATED ) );
+        GITHUB_COLUMNS.put( "Fix Version", new Integer( IssuesReportHelper.COLUMN_FIX_VERSION ) );
+        GITHUB_COLUMNS.put( "Id", new Integer( IssuesReportHelper.COLUMN_ID ) );
+        GITHUB_COLUMNS.put( "Reporter", new Integer( IssuesReportHelper.COLUMN_REPORTER ) );
+        GITHUB_COLUMNS.put( "Status", new Integer( IssuesReportHelper.COLUMN_STATUS ) );
+        GITHUB_COLUMNS.put( "Summary", new Integer( IssuesReportHelper.COLUMN_SUMMARY ) );
+        GITHUB_COLUMNS.put( "Type", new Integer( IssuesReportHelper.COLUMN_TYPE ) );
+        GITHUB_COLUMNS.put( "Updated", new Integer( IssuesReportHelper.COLUMN_UPDATED ) );
+    }
+
+    /**
+     * Sets the column names that you want to show in the report. The columns
+     * will appear in the report in the same order as you specify them here.
+     * Multiple values can be separated by commas.
+     * <p>
+     * Valid columns are: <code>Assignee</code>, <code>Created</code>,
+     * <code>Fix Version</code>, <code>Id</code>, <code>Reporter</code>,
+     * <code>Status</code>, <code>Summary</code>, <code>Type</code> and
+     * <code>Updated</code>.
+     * </p>
+     *
+     * @parameter default-value="Id,Type,Summary,Assignee,Reporter,Status,Created,Updated,Fix Version"
+     */
+    private String columnNames;
+
+    /**
+     * The scheme of your github api domain. Only use if using github enterprise.
+     *
+     * @parameter default-value="http"
+     */
+    private String githubAPIScheme;
+
+    /**
+     * The port of your github api domain. Only use if using github enterprise.
+     *
+     * @parameter default-value=80
+     */
+    private int githubAPIPort;
+
+    /**
+     * Boolean which says if we should include open issues in the report
+     *
+     * @parameter default-value=true
+     */
+    private boolean includeOpenIssues;
+
+    /**
+     * Boolean which says if we should include only issues with milestones
+     *
+     * @parameter default-value=true
+     */
+    private boolean onlyMilestoneIssues;
+
+    /**
+     * If you only want to show issues for the current version in the report.
+     * The current version being used is <code>${project.version}</code> minus
+     * any "-SNAPSHOT" suffix.
+     *
+     * @parameter default-value="false"
+     */
+    private boolean onlyCurrentVersion;
+
+    public String getOutputName()
+    {
+        return "github-report";
+    }
+
+    public String getName( Locale locale )
+    {
+        return getBundle( locale ).getString( "report.issues.name" );
+    }
+
+    public String getDescription( Locale locale )
+    {
+        return getBundle( locale ).getString( "report.issues.description" );
+    }
+
+    /* --------------------------------------------------------------------- */
+    /* Public methods                                                        */
+    /* --------------------------------------------------------------------- */
+
+    /**
+     * @see org.apache.maven.reporting.AbstractMavenReport#canGenerateReport()
+     */
+    public boolean canGenerateReport()
+    {
+        return ProjectUtils.validateIfIssueManagementComplete( project, "GitHub", "GitHub Report", getLog() );
+    }
+
+    @Override
+    protected void executeReport( Locale locale )
+        throws MavenReportException
+    {
+
+        // Validate parameters
+        List<Integer> columnIds = IssuesReportHelper.getColumnIds( columnNames, GITHUB_COLUMNS );
+        if ( columnIds.size() == 0 )
+        {
+            // This can happen if the user has configured column names and they are all invalid
+            throw new MavenReportException(
+                "maven-changes-plugin: None of the configured columnNames '" + columnNames + "' are valid." );
+        }
+
+        try
+        {
+            // Download issues
+            GitHubDownloader issueDownloader =
+                new GitHubDownloader( project, githubAPIScheme, githubAPIPort, includeOpenIssues, onlyMilestoneIssues );
+
+            List<Issue> issueList = issueDownloader.getIssueList();
+
+            if ( onlyCurrentVersion )
+            {
+                issueList = IssueUtils.getIssuesForVersion( issueList, project.getVersion() );
+                getLog().info( "The GitHub Report will contain issues only for the current version." );
+            }
+
+            // Generate the report
+            IssuesReportGenerator report = new IssuesReportGenerator( IssuesReportHelper.toIntArray( columnIds ) );
+
+            if ( issueList.isEmpty() )
+            {
+                report.doGenerateEmptyReport( getBundle( locale ), getSink() );
+                getLog().warn( "No issue was matched." );
+            }
+            else
+            {
+                report.doGenerateReport( getBundle( locale ), getSink(), issueList );
+            }
+        }
+        catch ( MalformedURLException e )
+        {
+            // Rethrow this error so that the build fails
+            throw new MavenReportException( "The Github URL is incorrect." );
+        }
+        catch ( Exception e )
+        {
+            e.printStackTrace();
+        }
+    }
+
+    /* --------------------------------------------------------------------- */
+    /* Private methods                                                       */
+    /* --------------------------------------------------------------------- */
+
+    private ResourceBundle getBundle( Locale locale )
+    {
+        return ResourceBundle.getBundle( "github-report", locale, this.getClass().getClassLoader() );
+    }
+
+}

Propchange: maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/github/GitHubMojo.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/github/GitHubMojo.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: maven/plugins/trunk/maven-changes-plugin/src/main/resources/github-report.properties
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-changes-plugin/src/main/resources/github-report.properties?rev=1352825&view=auto
==============================================================================
--- maven/plugins/trunk/maven-changes-plugin/src/main/resources/github-report.properties (added)
+++ maven/plugins/trunk/maven-changes-plugin/src/main/resources/github-report.properties Fri Jun 22 09:55:33 2012
@@ -0,0 +1,32 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you 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.
+
+report.issues.name=GitHub Report
+report.issues.description=Report on Issues from GitHub.
+report.issues.error=An error occured that made it impossible to generate this report. \
+  Please check the console for information on what might be the cause of this.
+report.issues.header=GitHub Report
+report.issues.label.assignee=Assignee
+report.issues.label.created=Created
+report.issues.label.fixVersion=Fix Version
+report.issues.label.id=#
+report.issues.label.reporter=Reporter
+report.issues.label.status=Status
+report.issues.label.summary=Summary
+report.issues.label.type=Type
+report.issues.label.updated=Updated
+report.issues.label.version=Version

Propchange: maven/plugins/trunk/maven-changes-plugin/src/main/resources/github-report.properties
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/plugins/trunk/maven-changes-plugin/src/main/resources/github-report.properties
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: maven/plugins/trunk/maven-changes-plugin/src/main/resources/github-report_en.properties
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-changes-plugin/src/main/resources/github-report_en.properties?rev=1352825&view=auto
==============================================================================
--- maven/plugins/trunk/maven-changes-plugin/src/main/resources/github-report_en.properties (added)
+++ maven/plugins/trunk/maven-changes-plugin/src/main/resources/github-report_en.properties Fri Jun 22 09:55:33 2012
@@ -0,0 +1,23 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you 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.
+
+# NOTE:
+# This bundle is intentionally empty because English strings are provided by the base bundle via the parent chain. It
+# must be provided nevertheless such that a request for locale "en" will not errorneously pick up the bundle for the
+# JVM's default locale (which need not be "en"). See the method javadoc about
+#   ResourceBundle.getBundle(String, Locale, ClassLoader)
+# for a full description of the lookup strategy.
\ No newline at end of file

Propchange: maven/plugins/trunk/maven-changes-plugin/src/main/resources/github-report_en.properties
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/plugins/trunk/maven-changes-plugin/src/main/resources/github-report_en.properties
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: maven/plugins/trunk/maven-changes-plugin/src/site/apt/examples/configuring-github-report.apt.vm
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-changes-plugin/src/site/apt/examples/configuring-github-report.apt.vm?rev=1352825&view=auto
==============================================================================
--- maven/plugins/trunk/maven-changes-plugin/src/site/apt/examples/configuring-github-report.apt.vm (added)
+++ maven/plugins/trunk/maven-changes-plugin/src/site/apt/examples/configuring-github-report.apt.vm Fri Jun 22 09:55:33 2012
@@ -0,0 +1,177 @@
+ ------
+ Configuring the GitHub Report
+ ------
+ Bryan Baugher
+ ------
+ 2012-06-21
+ ------
+
+ ~~ Licensed to the Apache Software Foundation (ASF) under one
+ ~~ or more contributor license agreements.  See the NOTICE file
+ ~~ distributed with this work for additional information
+ ~~ regarding copyright ownership.  The ASF licenses this file
+ ~~ to you 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.
+
+ ~~ NOTE: For help with the syntax of this file, see:
+ ~~ http://maven.apache.org/doxia/references/apt-format.html
+
+
+Configuring the GitHub Report
+
+ <<Note:>> See the {{{../github-report-mojo.html}goal documentation}} for 
+ detailed info on which feature was added in which version.
+
+* Using GitHub Enterprise
+
+  If you are using GitHub Enterprise you will want to make sure that the
+  githubAPIScheme and githubAPIPort are correct (they default to "http" and 80
+  by default). If either of these are incorrect make sure to include them in
+  your configuration.
+
++-----------------+
+<project>
+  ...
+  <reporting>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-changes-plugin</artifactId>
+        <version>${project.version}</version>
+        <configuration>
+          <githubAPIScheme>https</githubAPIScheme>
+          <githubAPIPort>443</githubAPIPort>
+        </configuration>
+        ...
+      </plugin>
+    </plugins>
+  </reporting>
+  ...
+</project>
++-----------------+
+
+* Filtering Issues
+
+ We'll start off by creating a GitHub Report for one or more versions of your
+ project. There are two ways to do this.
+
+** Only include closed issues
+
+ If you only want to include closed issues in your report make sure to configure
+ the includeOpenIssues to false in your configuration, which is true by default.
+
++-----------------+
+<project>
+  ...
+  <reporting>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-changes-plugin</artifactId>
+        <version>${project.version}</version>
+        <configuration>
+          <includeOpenIssues>false</includeOpenIssues>
+        </configuration>
+        ...
+      </plugin>
+    </plugins>
+  </reporting>
+  ...
+</project>
++-----------------+
+
+** Include issues without milestones
+
+ If you only want to include issues that do not have a milestone attached to them
+ in your report make sure to configure the onlyMilestoneIssues to false in your 
+ configuration, which is true by default.
+
++-----------------+
+<project>
+  ...
+  <reporting>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-changes-plugin</artifactId>
+        <version>${project.version}</version>
+        <configuration>
+          <onlyMilestoneIssues>false</onlyMilestoneIssues>
+        </configuration>
+        ...
+      </plugin>
+    </plugins>
+  </reporting>
+  ...
+</project>
++-----------------+
+
+** Using the current version
+
+ If you are lazy and only ever want the latest release in you GitHub Report, you
+ can use the <<<\<onlyCurrentVersion\>>>> configuration parameter. It will take
+ the version from your project's POM and try to match it against the milestone
+ title of the GitHub issues.
+
+ Once you have configured this, you can forget about it, as it updates itself
+ when you change the version number in your POM.
+
+ <<Note:>> The names of your milestones in GitHub must match the ones you use in
+ your POM. The <-SNAPSHOT> part of the version in your POM is handled
+ automatically by the plugin, so you don't need to include <-SNAPSHOT> in the
+ names of your milestones in GitHub.
+
++-----------------+
+<project>
+  ...
+  <reporting>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-changes-plugin</artifactId>
+        <version>${project.version}</version>
+        <configuration>
+          <onlyCurrentVersion>true</onlyCurrentVersion>
+        </configuration>
+        ...
+      </plugin>
+    </plugins>
+  </reporting>
+  ...
+</project>
++-----------------+
+
+
+* Selecting columns
+
+ You can select which columns to include in the report.
+
++-----------------+
+<project>
+  ...
+  <reporting>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-changes-plugin</artifactId>
+        <version>${project.version}</version>
+        <configuration>
+          <columnNames>Type,Key,Summary,Assignee,Status,Fix Version</columnNames>
+        </configuration>
+        ...
+      </plugin>
+    </plugins>
+  </reporting>
+  ...
+</project>
++-----------------+
\ No newline at end of file

Propchange: maven/plugins/trunk/maven-changes-plugin/src/site/apt/examples/configuring-github-report.apt.vm
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/plugins/trunk/maven-changes-plugin/src/site/apt/examples/configuring-github-report.apt.vm
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Modified: maven/plugins/trunk/maven-changes-plugin/src/site/apt/index.apt
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-changes-plugin/src/site/apt/index.apt?rev=1352825&r1=1352824&r2=1352825&view=diff
==============================================================================
--- maven/plugins/trunk/maven-changes-plugin/src/site/apt/index.apt (original)
+++ maven/plugins/trunk/maven-changes-plugin/src/site/apt/index.apt Fri Jun 22 09:55:33 2012
@@ -51,6 +51,8 @@ Maven Changes Plugin
   * {{{./jira-report-mojo.html}changes:jira-report}} create a report from issues downloaded from {{{http://www.atlassian.com/software/jira/}JIRA}}.
 
   * {{{./trac-report-mojo.html}changes:trac-report}} create a report from issues downloaded from {{{http://trac.edgewall.org/}Trac}}.
+  
+  * {{{./github-report-mojo.html}changes:github-report}} create a report from issues downloaded from {{{http://github.com/}GitHub}}.
 
   []
 
@@ -86,6 +88,8 @@ Maven Changes Plugin
   * {{{./examples/configuring-trac-report.html}Configuring the Trac Report}}
 
   * {{{./examples/customizing-jira-report.html}Customizing the JIRA Report}}
+  
+  * {{{./examples/configuring-github-report.html}Configuring the GitHub Report}}
 
   * {{{./examples/include-announcement-file.html}Include an Announcement File in Your Packaging}}
 

Modified: maven/plugins/trunk/maven-changes-plugin/src/site/apt/usage.apt.vm
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-changes-plugin/src/site/apt/usage.apt.vm?rev=1352825&r1=1352824&r2=1352825&view=diff
==============================================================================
--- maven/plugins/trunk/maven-changes-plugin/src/site/apt/usage.apt.vm (original)
+++ maven/plugins/trunk/maven-changes-plugin/src/site/apt/usage.apt.vm Fri Jun 22 09:55:33 2012
@@ -233,7 +233,59 @@ mvn site
   For info on how to modify the JIRA Report see the
   {{{./examples/customizing-jira-report.html}Customizing the JIRA Report}}
   example.
+  
+*How to Generate the GitHub Report
+
+  <<Note:>> To use the GitHub Report, the <<<\<issueManagement\>>>> section in
+  the <<<pom.xml>>> of your project must be configured. It might look something
+  like this:
+
+-------------------
+<project>
+  ...
+  <issueManagement>
+    <system>GitHub</system>
+    <url>https://github.com/rails/rails/issues</url>
+  </issueManagement>
+  ...
+</project>
+-------------------
+
+  To generate the GitHub Report, insert the Changes Plugin in the
+  <<<\<reporting\>>>> section of your project's <<<pom.xml>>>
+
+-------------------
+<project>
+  ...
+  <reporting>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-changes-plugin</artifactId>
+        <version>${project.version}</version>
+        <reportSets>
+          <reportSet>
+            <reports>
+              <report>github-report</report>
+            </reports>
+          </reportSet>
+        </reportSets>
+      </plugin>
+    </plugins>
+  </reporting>
+  ...
+</project>
+-------------------
+
+  and execute the site goal to generate the report.
 
+-------------------
+mvn site
+-------------------
+
+  For info on how to modify the JIRA Report see the
+  {{{./examples/configuring-github-report.html}Configuring the GitHub Report}}
+  example.
 
 *How to generate and send the Announcement via Email
 

Modified: maven/plugins/trunk/maven-changes-plugin/src/site/site.xml
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-changes-plugin/src/site/site.xml?rev=1352825&r1=1352824&r2=1352825&view=diff
==============================================================================
--- maven/plugins/trunk/maven-changes-plugin/src/site/site.xml (original)
+++ maven/plugins/trunk/maven-changes-plugin/src/site/site.xml Fri Jun 22 09:55:33 2012
@@ -44,6 +44,7 @@ under the License.
       <item name="Check Your changes.xml File" href="examples/check-changes-file.html"/>
       <item name="Configuring the Trac Report" href="examples/configuring-trac-report.html"/>
       <item name="Customizing the JIRA Report" href="examples/customizing-jira-report.html"/>
+      <item name="Configuring the GitHub Report" href="examples/configuring-github-report.html"/>
       <item name="Include an Announcement File in Your Packaging" href="examples/include-announcement-file.html"/>
       <item name="SMTP Authentication" href="examples/smtp-authentication.html"/>
       <item name="Specifying the Mail Sender" href="examples/specifying-mail-sender.html"/>