-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* events to be consumed by the summary generator * testing summaries, automatic GitHub summary * include gradle scans * updated docs * fixed tests on GitHub, updated summaries * fixed no-token test * fixed checkstyle violation * license bump
- Loading branch information
Showing
91 changed files
with
738 additions
and
112 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
apps/pierrot/src/main/java/com/agorapulse/pierrot/cli/CreateCommand.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
apps/pierrot/src/main/java/com/agorapulse/pierrot/cli/DeleteCommand.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
apps/pierrot/src/main/java/com/agorapulse/pierrot/cli/InitCommand.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
apps/pierrot/src/main/java/com/agorapulse/pierrot/cli/PullCommand.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
apps/pierrot/src/main/java/com/agorapulse/pierrot/cli/PushCommand.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
apps/pierrot/src/main/java/com/agorapulse/pierrot/cli/ReplaceCommand.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
apps/pierrot/src/main/java/com/agorapulse/pierrot/cli/SearchCommand.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
apps/pierrot/src/main/java/com/agorapulse/pierrot/cli/StatusCommand.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
apps/pierrot/src/main/java/com/agorapulse/pierrot/cli/mixin/FileMixin.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
apps/pierrot/src/main/java/com/agorapulse/pierrot/cli/mixin/ProjectMixin.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
apps/pierrot/src/main/java/com/agorapulse/pierrot/cli/mixin/PullRequestMixin.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
apps/pierrot/src/main/java/com/agorapulse/pierrot/cli/mixin/SearchMixin.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
apps/pierrot/src/main/java/com/agorapulse/pierrot/cli/mixin/WorkspaceDescriptor.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
apps/pierrot/src/main/java/com/agorapulse/pierrot/cli/mixin/WorkspaceMixin.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
55 changes: 55 additions & 0 deletions
55
apps/pierrot/src/main/java/com/agorapulse/pierrot/cli/summary/SummaryWriter.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
/* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
* | ||
* Copyright 2021-2023 Vladimir Orany. | ||
* | ||
* 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 | ||
* | ||
* https://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 com.agorapulse.pierrot.cli.summary; | ||
|
||
import com.agorapulse.pierrot.api.summary.SummaryCollector; | ||
import com.agorapulse.pierrot.api.util.LoggerWithOptionalStacktrace; | ||
import io.micronaut.context.annotation.Requires; | ||
import io.micronaut.context.annotation.Value; | ||
import jakarta.inject.Singleton; | ||
import org.slf4j.Logger; | ||
|
||
import java.io.File; | ||
import java.nio.file.Files; | ||
|
||
@Singleton | ||
@Requires(property = "summary.file", bean = SummaryCollector.class) | ||
public class SummaryWriter { | ||
|
||
private static final Logger LOGGER = LoggerWithOptionalStacktrace.create(SummaryWriter.class); | ||
|
||
private final String summaryFilePath; | ||
private final SummaryCollector collector; | ||
|
||
public SummaryWriter(@Value("${summary.file}") String summaryFilePath, SummaryCollector collector) { | ||
this.summaryFilePath = summaryFilePath; | ||
this.collector = collector; | ||
} | ||
|
||
public File write() { | ||
try { | ||
File file = new File(summaryFilePath); | ||
file.getParentFile().mkdirs(); | ||
Files.writeString(file.toPath(), collector.getSummary()); | ||
return file; | ||
} catch (Exception e) { | ||
LOGGER.error("Cannot write summary to " + summaryFilePath, e); | ||
return null; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.