Skip to content

Commit bcd6c72

Browse files
committed
fix: address PR comments
1 parent b820ac8 commit bcd6c72

3 files changed

Lines changed: 12 additions & 11 deletions

File tree

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ jobs:
6464
uses: ncipollo/release-action@v1
6565
with:
6666
allowUpdates: true
67-
draft: "${{ github.event.inputs.fast-release }}"
67+
draft: "${{ github.event.inputs.draft-release }}"
6868
generateReleaseNotes: true
6969
artifacts: artifacts/**
7070
#token: ${{ secrets.GITHUB_TOKEN }}

src/main/kotlin/io/github/guidewire/oss/Main.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ fun main(args: Array<String>) {
1414
val inputStream = object {}.javaClass.getResourceAsStream("/app.properties")
1515
inputStream?.use { properties.load(it) }
1616

17-
val version = properties.getProperty("appVersion")
17+
val version = properties.getProperty("appVersion", "0.0.0")
1818

1919
try {
2020
val command = FernJUnitClientCommand()
@@ -23,7 +23,7 @@ fun main(args: Array<String>) {
2323
.completionOption()
2424
command.main(args)
2525
} catch (e: Exception) {
26-
System.err.println("ERROR: ${e.message}")
26+
System.err.println("ERROR: [${e::class.simpleName}] ${e.message}")
2727
exitProcess(1)
2828
}
2929
}

src/main/kotlin/io/github/guidewire/oss/cli/SendCommand.kt

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,16 +18,11 @@ class SendCommand : CliktCommand(
1818
return "Send JUnit test reports to Fern"
1919
}
2020

21-
private val fernUrl by option("-u", "--fern-url", help = "Base URL of the Fern Reporter instance to send test reports to")
22-
.required()
23-
24-
private val projectName by option("-p", "--project-name", help = "Name of the project to associate test reports with")
25-
.required()
26-
21+
private val fernUrl by option("-u", "--fern-url", help = "Base URL of the Fern Reporter instance to send test reports to").required()
22+
private val projectName by option("-n", "--project-name", help = "Name of the project to associate test reports with").required()
23+
private val projectId by option("-i", "--project-id", help = "ID of the project to associate test reports with").required()
2724
private val filePatterns: List<String> by option("-f", "--file-pattern", help = "File name pattern of test reports to send to Fern").multiple(required = true)
28-
2925
private val tags by option("-t", "--tags", help = "Comma-separated tags to be included on runs")
30-
3126
private val verbose by option("-v", "--verbose", help = "Enable verbose output").flag()
3227

3328
override fun run() {
@@ -37,6 +32,7 @@ class SendCommand : CliktCommand(
3732
val testRun = TestRun(
3833
testProjectName = projectName,
3934
testSeed = System.currentTimeMillis(),
35+
testProjectId = projectId,
4036
)
4137

4238
// Process each report path
@@ -67,6 +63,11 @@ class SendCommand : CliktCommand(
6763

6864
echo("Found ${testRun.suiteRuns.size} test suites with a total of ${testRun.suiteRuns.sumOf { it.specRuns.size }} test specs")
6965

66+
if (!fernUrl.startsWith("http")) {
67+
echo("ERROR: Fern URL must start with 'http' or 'https'", err = true)
68+
exitProcess(1)
69+
}
70+
7071
sendTestRun(testRun, fernUrl, verbose).fold(
7172
onSuccess = {
7273
echo("Successfully published test results to Fern")

0 commit comments

Comments
 (0)