Configuring the GitHub Report

Note: See the goal documentation for detailed info on which feature was added in which version.

Using GitHub Enterprise

Additional configurations are not needed. Address of your GitHub instance will be taken from project -> issueManagement -> url

Authenticating to the GitHub REST API

If you are using GitHub Enterprise or you want to authenticate to GitHub, configure the server in settings.xml like so:

<settings>
  ...
  <servers>
    <server>
      <id>github</id>
      <password>YOUR-TOKEN</password>
    </server>
  </servers>
  ...
</settings>

Only the password item is used as your token for Authorization: Bearer YOUR-TOKEN

The default serverId is github. You can change it by setting the <githubAPIServerId> configuration parameter.

Authenticating to the REST API

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>3.0.0-M1</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>3.0.0-M1</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>3.0.0-M1</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>3.0.0-M1</version>
        <configuration>
          <columnNames>Type,Key,Summary,Assignee,Status,Fix Version</columnNames>
        </configuration>
        ...
      </plugin>
    </plugins>
  </reporting>
  ...
</project>