Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Generation of release notes #1366

Merged
merged 1 commit into from
Dec 1, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions flank-scripts/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ shadowJar.apply {
}
}
// <breaking change>.<feature added>.<fix/minor change>
version = "1.1.0"
version = "1.1.1"
group = "com.github.flank"

application {
Expand Down Expand Up @@ -201,4 +201,4 @@ fun <T> withTempFile(block: File.() -> T): T {
return block(tempFile).also { tempFile.delete() }
}

tasks["detekt"].dependsOn(tasks["checkIfVersionUpdated"])
// TODO temporary disabled tasks["check"].dependsOn(tasks["checkIfVersionUpdated"])
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make a ticket for this so its not forgotten about?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah I will do it just after merging it

Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import com.github.kittinunf.fuel.Fuel
import com.github.kittinunf.fuel.core.Request
import com.github.kittinunf.fuel.core.extensions.authentication
import com.github.kittinunf.fuel.coroutines.awaitResult
import com.github.kittinunf.result.onError
import com.jcabi.github.Coordinates
import com.jcabi.github.Release
import com.jcabi.github.Releases
Expand All @@ -17,9 +18,10 @@ import flank.scripts.exceptions.toGithubException

suspend fun getPrDetailsByCommit(commitSha: String, githubToken: String) =
Fuel.get("https://api.github.com/repos/flank/flank/commits/$commitSha/pulls")
.appendGitHubHeaders(githubToken)
.appendGitHubHeaders(githubToken, "application/vnd.github.groot-preview+json")
.awaitResult(GithubPullRequestListDeserializer)
.mapClientError { it.toGithubException() }
.onError { println("Could not download info for commit $commitSha, because of ${it.message}") }

suspend fun getLatestReleaseTag(githubToken: String) =
Fuel.get("https://api.github.com/repos/flank/flank/releases/latest")
Expand Down Expand Up @@ -47,8 +49,8 @@ suspend fun getGitHubIssue(githubToken: String, issueNumber: Int) =
.awaitResult(GithubPullRequestDeserializer)
.mapClientError { it.toGithubException() }

fun Request.appendGitHubHeaders(githubToken: String) =
appendHeader("Accept", "application/vnd.github.v3+json")
fun Request.appendGitHubHeaders(githubToken: String, contentType: String = "application/vnd.github.v3+json") =
appendHeader("Accept", contentType)
.appendHeader("Authorization", "token $githubToken")

private const val DELETE_ENDPOINT = "https://api.github.com/repos/Flank/flank/git/refs/tags/"
Expand Down