Skip to content

Commit

Permalink
[0.7.0] - 2023-09-28
Browse files Browse the repository at this point in the history
  • Loading branch information
fugerit79 committed Sep 28, 2023
1 parent 059251c commit f28f331
Show file tree
Hide file tree
Showing 9 changed files with 234 additions and 188 deletions.
17 changes: 17 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,23 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [0.7.0] - 2023-09-28

### Added

- 'help' and 'github-token' parameter parameter
- command line reference

### Changed

- parent set to fj-universe-tool 0.4.7

### Fixed

- removed link from Java and Maven badges
- placeholder in LICENSE set
- software version links

## [0.6.2] - 2023-09-24

### Added
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@
same "printed page" as the copyright notice for easier
identification within third-party archives.

Copyright 2017 Matteo a.k.a. Fugerit
Copyright 2017 Matteo Franci a.k.a. Fugerit

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
41 changes: 29 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,22 +9,39 @@ Simple propject to export github issues to a xls spreadsheet.
[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=fugerit-org_github-issue-export&metric=alert_status)](https://sonarcloud.io/summary/new_code?id=fugerit-org_github-issue-export)
[![Coverage](https://sonarcloud.io/api/project_badges/measure?project=fugerit-org_github-issue-export&metric=coverage)](https://sonarcloud.io/summary/new_code?id=fugerit-org_github-issue-export)

![Java runtime version](https://img.shields.io/badge/run%20on-java%208+-%23113366.svg?style=for-the-badge&logo=openjdk&logoColor=white)
![Java build version](https://img.shields.io/badge/build%20on-java%2011+-%23ED8B00.svg?style=for-the-badge&logo=openjdk&logoColor=white)
![Apache Maven](https://img.shields.io/badge/Apache%20Maven-3.9.0+-C71A36?style=for-the-badge&logo=Apache%20Maven&logoColor=white)
[![Java runtime version](https://img.shields.io/badge/run%20on-java%208+-%23113366.svg?style=for-the-badge&logo=openjdk&logoColor=white)](https://universe.fugerit.org/src/docs/versions/java8.html)
[![Java build version](https://img.shields.io/badge/build%20on-java%2011+-%23ED8B00.svg?style=for-the-badge&logo=openjdk&logoColor=white)](https://universe.fugerit.org/src/docs/versions/java11.html)
[![Apache Maven](https://img.shields.io/badge/Apache%20Maven-3.9.0+-C71A36?style=for-the-badge&logo=Apache%20Maven&logoColor=white)](https://universe.fugerit.org/src/docs/versions/maven3_9.html)

## Quickstart

### Clone (use master or develop branch for latest snapshot, release/x.x.x branch for stable versions)
git clone https://github.com/fugerit-org/github-issue-export.git
build :

### Build
From base dir :
mvn clean install -P singlepackage
`mvn clean install -P singlepackage`

### Run with a simple gui
java -jar target/dist-github-issue-export-X.X.X.jar
run as gui :

### Run on command line
java -jar target/dist-github-issue-export-X.X.X.jar --gui 0 --owner fugerit-org --repo github-issue-export --lang it --xls-file target/report.xls
`java -jar target/dist-github-issue-export-*.jar`

run command line :

```
java -jar target/dist-github-issue-export-*.jar --gui 0 \
--owner fugerit-org \
--repo github-issue-export \
--lang it \
--xls-file target/report.xls
```

## **parameter help**

| **name** | **required** | **default** | **description** | **since** | **info** |
|---------------|---------------|---------------|---------------|---------------|---------------|
| `gui` | `false` | `true` | If `true` will open the Export GUI. | 0.6.2 | `true` or `1` will both evaluate to `true`. |
| `owner` | `false` | none | Repository owner (ex. 'fugerit-org'). | 0.6.2 | Required in command line mode (gui parameter = 0). |
| `repo` | `false` | none | Repository name (ex. 'github-issue-export'). | 0.6.2 | Required in command line mode (gui parameter = 0). |
| `xls-file` | `false` | none | Path to the .xls file (ex. 'report.xls'). | 0.6.2 | Required in command line mode (gui parameter = 0). |
| `github-token` | `false` | none | Github auth token. | 0.6.2 | Needed for privare repositories or to increase github api usage limits. |
| `lang` | `false` | none | Language code, currently supported : 'en', 'it'. | 0.6.2 | If not set will default to default locale or en. |
| `help` | `false` | none | Print help about the tool. | 0.1.0 | |

165 changes: 8 additions & 157 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,16 @@
<modelVersion>4.0.0</modelVersion>

<parent>
<groupId>org.fugerit.java</groupId>
<artifactId>fj-bom</artifactId>
<version>1.4.4</version>
<groupId>org.fugerit.java.universe</groupId>
<artifactId>fj-universe-tool</artifactId>
<version>0.4.7</version>
<relativePath></relativePath>
</parent>

<groupId>org.fugerit.java</groupId>
<artifactId>github-issue-export</artifactId>

<version>0.6.2</version>
<version>0.7.0</version>
<packaging>jar</packaging>

<name>github-issue-export</name>
Expand All @@ -25,12 +26,8 @@
</scm>

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.target>1.8</maven.compiler.target>
<maven.compiler.source>1.8</maven.compiler.source>
<fj-version>8.3.8</fj-version>
<fasterxml-jackson-core-version>2.15.2</fasterxml-jackson-core-version>
<fasterxml-jackson-databind-version>2.15.2</fasterxml-jackson-databind-version>
<java-version-compliance>8</java-version-compliance>
<tool-main-class>org.fugerit.java.github.issue.export.GithubIssueExportMain</tool-main-class>
<sonar.projectKey>fugerit-org_github-issue-export</sonar.projectKey>
</properties>

Expand Down Expand Up @@ -66,53 +63,19 @@

<dependencies>

<dependency>
<groupId>org.fugerit.java</groupId>
<artifactId>fj-core</artifactId>
<version>${fj-version}</version>
</dependency>

<!-- logging -->
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
</dependency>

<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi</artifactId>
<version>${poi-version}</version>
<artifactId>poi-ooxml</artifactId>
</dependency>

<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-core</artifactId>
<version>${fasterxml-jackson-core-version}</version>
</dependency>

<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>${fasterxml-jackson-databind-version}</version>
</dependency>

<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<scope>provided</scope>
</dependency>

<!-- for testing -->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-simple</artifactId>
<scope>provided</scope>
</dependency>

<dependency>
Expand All @@ -135,118 +98,6 @@

</dependencies>

<profiles>

<profile>
<id>singlepackage</id>
<dependencies>
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi-ooxml</artifactId>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-api</artifactId>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-core</artifactId>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-slf4j2-impl</artifactId>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>3.0.2</version>
<configuration>
<archive>
<manifest>
<addClasspath>true</addClasspath>
<mainClass>org.fugerit.java.github.issue.export.GithubIssueExportMain</mainClass>
</manifest>
</archive>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<executions>
<execution>
<id>add-resource</id>
<phase>generate-resources</phase>
<goals>
<goal>add-resource</goal>
</goals>
<configuration>
<resources>
<resource>
<directory>src/main/config</directory>
<targetPath>.</targetPath>
<includes>
<include>**/*.xml</include>
</includes>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.1.0</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
</execution>
</executions>
<configuration>
<finalName>dist-${project.artifactId}-${project.version}</finalName>
</configuration>
</plugin>
</plugins>
</build>
</profile>

<profile>
<id>jsonschema2pojo</id>
<build>
<plugins>
<plugin>
<!-- Genera gli oggetti di modello java per degli oggetti JSON : http://www.jsonschema2pojo.org/
https://github.com/joelittlejohn/jsonschema2pojo/wiki/Getting-Started -->
<groupId>org.jsonschema2pojo</groupId>
<artifactId>jsonschema2pojo-maven-plugin</artifactId>
<version>0.4.33</version>
<configuration>
<sourceType>json</sourceType>
<sourceDirectory>${project.basedir}/src/main/resources/pojo-config/json-source</sourceDirectory>
<targetPackage>org.fugerit.java.github.issue.export.model</targetPackage>
<!-- <sourceDirectory>${basedir}/src/main/resources/schema</sourceDirectory>
<targetPackage>it.sogei.anpr.subentro.bpm.client.pojo</targetPackage> -->
</configuration>
<executions>
<execution>
<goals>
<goal>generate</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>

</profiles>

<organization>
<url>http://www.fugerit.org</url>
<name>Fugerit</name>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ private GithubIssueExport() {}

public static final String ARG_GITHUB_USER = "github_user";
public static final String ARG_GITHUB_PASS = "github_pass";
public static final String ARG_GITHUB_TOKEN = "github-token";

public static final String ARG_XLSFILE = "xls-file";

Expand Down Expand Up @@ -272,7 +273,7 @@ private static String readUrlData( String url, GithubIssueInfo info ) {
final String proxyUser = info.getProperty( ARG_PROXY_USER );
final String proxyPass = info.getProperty( ARG_PROXY_PASS );
String githubUser = info.getProperty( ARG_GITHUB_USER );
String githubPass = info.getProperty( ARG_GITHUB_PASS );
String githubPass = info.getProperty( ARG_GITHUB_TOKEN, info.getProperty( ARG_GITHUB_PASS ) ); // github_pass is checked for backward compatibility
logger.info( "connecting to url : {}(user:{})", url, githubUser );
HttpURLConnection conn;
if ( !StringUtils.isEmpty( proxyHost ) && !StringUtils.isEmpty( proxyPort ) ) {
Expand All @@ -297,7 +298,7 @@ public PasswordAuthentication getPasswordAuthentication() {
// the githubPass is used as Bearer token
// the githuUser is ignored
if ( StringUtils.isNotEmpty( githubPass ) ) {
logger.info( "Set bearer token : {}", githubPass );
logger.info( "Set bearer token size : {}", githubPass.length() );
conn.setRequestProperty("Authorization", "Bearer "+githubPass );
}
}
Expand Down
Loading

0 comments on commit f28f331

Please sign in to comment.