1
mirror of https://github.com/CarmJos/GithubReleases4J.git synced 2024-09-19 21:55:45 +00:00

[v1.2.2] [A] Add GPG Settings.

This commit is contained in:
Carm Jos 2022-01-22 14:41:52 +08:00
parent a3cb4bcb1a
commit c53ca18e96
2 changed files with 8 additions and 5 deletions

View File

@ -143,6 +143,12 @@
</goals>
</execution>
</executions>
<configuration>
<gpgArguments>
<arg>--pinentry-mode</arg>
<arg>loopback</arg>
</gpgArguments>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>

View File

@ -8,7 +8,6 @@ import org.json.JSONObject;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.Optional;
import java.util.stream.Collectors;
import java.util.stream.IntStream;
@ -135,10 +134,8 @@ public class GithubRelease {
*
* @return The author user {@link GithubUser}
*/
public @Nullable GithubUser getAuthor() {
return Optional.ofNullable(getContents().getJSONObject("author"))
.map(GithubUser::of)
.orElse(null);
public @NotNull GithubUser getAuthor() {
return GithubUser.of(getContents().getJSONObject("author"));
}
/**