Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: danger/kotlin
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 1.3.0
Choose a base ref
...
head repository: danger/kotlin
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 1.3.1
Choose a head ref
  • 16 commits
  • 14 files changed
  • 1 contributor

Commits on Mar 25, 2024

  1. 1

    Verified

    This commit was signed with the committer’s verified signature.
    nakatanakatana nakatanakatana
    Copy the full SHA
    11de60e View commit details
  2. Update README.md

    Vacxe authored Mar 25, 2024

    Verified

    This commit was signed with the committer’s verified signature.
    nakatanakatana nakatanakatana
    Copy the full SHA
    9fb59e9 View commit details

Commits on Apr 8, 2024

  1. fix(core): bump kotlin version to 1.7.22

    Vacxe committed Apr 8, 2024

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    fc493fe View commit details
  2. Merge pull request #275 from danger/kotlin-bump-version

    fix(core): bump kotlin version to 1.7.22
    Vacxe authored Apr 8, 2024

    Verified

    This commit was signed with the committer’s verified signature. The key has expired.
    suzuki-shunsuke Shunsuke Suzuki
    Copy the full SHA
    b5747bd View commit details

Commits on Apr 24, 2024

  1. fix(github): user optional fields

    Vacxe committed Apr 24, 2024

    Verified

    This commit was signed with the committer’s verified signature. The key has expired.
    suzuki-shunsuke Shunsuke Suzuki
    Copy the full SHA
    30da003 View commit details
  2. feat(core): update version for 1.3.1 release

    Vacxe committed Apr 24, 2024

    Verified

    This commit was signed with the committer’s verified signature. The key has expired.
    suzuki-shunsuke Shunsuke Suzuki
    Copy the full SHA
    58edce5 View commit details
  3. Merge pull request #278 from danger/fix-user-optional-fields

    fix(github): user optional fields
    Vacxe authored Apr 24, 2024

    Unverified

    This commit is not signed, but one or more authors requires that any commit attributed to them is signed.
    Copy the full SHA
    c9bbb82 View commit details
  4. Merge pull request #279 from danger/prepare-1.3.1

    feat(core): update version for 1.3.1 release
    Vacxe authored Apr 24, 2024
    Copy the full SHA
    fb1d13d View commit details
  5. feat(docker): add gha for manual update docker

    Vacxe committed Apr 24, 2024
    Copy the full SHA
    9b89799 View commit details
  6. Merge pull request #280 from danger/prepare-1.3.1

    feat(docker): add gha for manual update docker
    Vacxe authored Apr 24, 2024
    Copy the full SHA
    ca1072b View commit details
  7. Copy the full SHA
    2220d15 View commit details
  8. fix(docker): missed brackets

    Vacxe committed Apr 24, 2024
    Copy the full SHA
    2fc8d07 View commit details
  9. fix(core): missed default serialisation values

    Vacxe committed Apr 24, 2024
    Copy the full SHA
    ab2ea8a View commit details
  10. Merge pull request #281 from danger/fix-serialization

    fix(core): missed default serialisation values
    Vacxe authored Apr 24, 2024
    Copy the full SHA
    a1fd8a3 View commit details
  11. Update GitHub.kt

    fix(core) nullable field in GitHub user model
    Vacxe authored Apr 24, 2024
    Copy the full SHA
    485cb78 View commit details
  12. Merge pull request #282 from danger/Vacxe-patch-1

    Update GitHub.kt
    Vacxe authored Apr 24, 2024
    Copy the full SHA
    783edcc View commit details
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -20,7 +20,7 @@ jobs:

- name: Install Kotlin
run: |
curl -o kotlin-compiler.zip -L https://github.com/JetBrains/kotlin/releases/download/v1.7.0/kotlin-compiler-1.7.0.zip
curl -o kotlin-compiler.zip -L https://github.com/JetBrains/kotlin/releases/download/v1.7.22/kotlin-compiler-1.7.22.zip
if [[ "$OSTYPE" != "darwin"* ]]
then
44 changes: 44 additions & 0 deletions .github/workflows/docker_manual.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Build Docker (Manual)

on:
workflow_dispatch :
inputs:
docker-version:
description: "Docker Version"
danger-js-version:
description: "Danger JS release version"
default: "11.3.1"
danger-kotlin-version:
description: "Danger Kotlin release version"
kotlin-version:
description: "Kotlin Version"
default: "1.7.22"

jobs:
docker-build-push:
name: Build and Push Docker image
permissions:
contents: read
packages: write
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Docker Login
run: echo $PACKAGES_WRITE_TOKEN | docker login ghcr.io -u $USERNAME --password-stdin
env:
PACKAGES_WRITE_TOKEN: ${{ secrets.GITHUB_TOKEN }}
USERNAME: ${{ github.actor }}

- name: Docker Build
run: docker build -t ghcr.io/danger/danger-kotlin:$VERSION --build-arg="KOTLINC_VERSION=$KOTLINC_VERSION" --build-arg="DANGER_KOTLIN_VERSION=$DANGER_KOTLIN_VERSION" --build-arg="DANGER_JS_VERSION=$DANGER_JS_VERSION" .
env:
VERSION: ${{ github.event.inputs.docker-version }}
KOTLINC_VERSION: ${{ github.event.inputs.kotlin-version }}
DANGER_KOTLIN_VERSION: ${{ github.event.inputs.danger-kotlin-version }}
DANGER_JS_VERSION: ${{ github.event.inputs.danger-js-version }}

- name: Deploy
run: docker push ghcr.io/danger/danger-kotlin:$VERSION
env:
VERSION: ${{ github.event.inputs.docker-version }}
7 changes: 4 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -7,8 +7,9 @@ LABEL "com.github.actions.description"="Runs Kotlin Dangerfiles"
LABEL "com.github.actions.icon"="zap"
LABEL "com.github.actions.color"="blue"

ARG KOTLINC_VERSION="1.7.0"
ARG DANGER_KOTLIN_VERSION="1.3.0"
ARG KOTLINC_VERSION="1.7.22"
ARG DANGER_KOTLIN_VERSION="1.3.1"
ARG DANGER_JS_VERSION="11.3.1"

# Install dependencies
RUN apt-get update
@@ -21,7 +22,7 @@ RUN wget -q "https://github.com/JetBrains/kotlin/releases/download/v$KOTLINC_VER
ENV PATH $PATH:/usr/lib/kotlinc/bin

# Install Danger-JS
RUN npm install -g danger
RUN npm install -g "danger@$DANGER_JS_VERSION"

# Install Danger-Kotlin
RUN wget -q "https://github.com/danger/kotlin/releases/download/$DANGER_KOTLIN_VERSION/danger-kotlin-linuxX64.tar" && \
22 changes: 16 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[![Current
Version](https://img.shields.io/badge/danger%20kotlin-v1.2.0-orange)](https://danger.systems/kotlin/)
Version](https://img.shields.io/badge/danger%20kotlin-v1.3.1-orange)](https://danger.systems/kotlin/)
[![Maven Central - SDK](https://img.shields.io/maven-central/v/systems.danger/danger-kotlin-sdk.svg?label=danger-kotlin-sdk)](https://search.maven.org/search?q=g:%22systems.danger%22%20AND%20a:%22danger-kotlin-sdk%22)
[![Awesome Kotlin Badge](https://kotlin.link/awesome-kotlin.svg)](https://github.com/KotlinBy/awesome-kotlin)

@@ -47,11 +47,16 @@ danger(args) {

### Setup

#### macOS
#### macOS (ARM)
```sh
brew install danger/tap/danger-kotlin
```

#### macOS (Intel)
```sh
brew install danger/tap/danger-kotlin-intel
```

You need to have Xcode installed and not relying on command line tools.
If you're seeing this error when running xcodebuild:

@@ -75,6 +80,12 @@ source ~/.bash_profile
### GitHub Actions
You can add danger/kotlin to your actions

Parameters:
* `dangerfile`: Path to danger file, required: `false`, default: `Dangerfile.df.kts`
* `run-mode`: Run mode: `ci`, `local`, `pr`, required: `false` default: `ci`
* `job-id:` Reported CI job ID, required: `false`, default: `danger/kotlin`
* `args`: Extra custom arguments like "--failOnErrors --no-publish-check" and etc, required: `false`

```yml
jobs:
build:
@@ -83,7 +94,7 @@ jobs:
steps:
- uses: actions/checkout@v1
- name: Danger
uses: danger/kotlin@1.2.0
uses: danger/kotlin@1.3.1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
```
@@ -101,9 +112,8 @@ jobs:
steps:
- uses: actions/checkout@v1
- name: Danger
uses: docker://ghcr.io/danger/danger-kotlin:1.2.0
with:
args: --failOnErrors --no-publish-check
uses: docker://ghcr.io/danger/danger-kotlin:1.3.1
run: danger-kotlin ci --failOnErrors --no-publish-check
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
```
2 changes: 1 addition & 1 deletion danger-kotlin-kts/version.gradle
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
group 'systems.danger'
version '1.3.0'
version '1.3.1'
Original file line number Diff line number Diff line change
@@ -65,9 +65,9 @@ enum class GitHubPullRequestState {
data class GitHubPR(
val number: Int,
val title: String,
val body: String?,
val body: String? = null,
val user: GitHubUser,
val assignee: GitHubUser?,
val assignee: GitHubUser? = null,
val assignees: List<GitHubUser>,
@SerialName("created_at") val createdAt: Instant,
@SerialName("updated_at") val updatedAt: Instant,
@@ -78,14 +78,14 @@ data class GitHubPR(
val state: GitHubPullRequestState,
@SerialName("draft") val isDraft: Boolean,
@SerialName("locked") val isLocked: Boolean,
@SerialName("merged") val isMerged: Boolean?,
@SerialName("commits") val commitCount: Int?,
@SerialName("comments") val commentCount: Int?,
@SerialName("review_comments") val reviewCommentCount: Int?,
val additions: Int?,
val deletions: Int?,
@SerialName("changed_files") val changedFiles: Int?,
val milestone: GitHubMilestone?,
@SerialName("merged") val isMerged: Boolean? = null,
@SerialName("commits") val commitCount: Int? = null,
@SerialName("comments") val commentCount: Int? = null,
@SerialName("review_comments") val reviewCommentCount: Int? = null,
val additions: Int? = null,
val deletions: Int? = null,
@SerialName("changed_files") val changedFiles: Int? = null,
val milestone: GitHubMilestone? = null,
@SerialName("html_url") val htmlURL: String
)

@@ -150,7 +150,7 @@ data class GitHubRepo(
val fullName: String,
@SerialName("private")
val isPrivate: Boolean,
val description: String?,
val description: String? = null,
@SerialName("fork")
val isFork: Boolean,
@SerialName("html_url")
@@ -178,10 +178,11 @@ enum class GitHubReviewState {
@Serializable
data class GitHubReview(
val user: GitHubUser,
val id: Long?,
val body: String?,
@SerialName("commit_id") val commitId: String?,
val state: GitHubReviewState?
val id: Long? = null,
val body: String? = null,
@SerialName("commit_id")
val commitId: String? = null,
val state: GitHubReviewState? = null
)

/**
@@ -197,9 +198,9 @@ data class GitHubReview(
data class GitHubCommit(
val sha: String,
val url: String,
val author: GitHubUser?,
val author: GitHubUser? = null,
val commit: GitCommit,
val committer: GitHubUser?
val committer: GitHubUser? = null
)

@Serializable
@@ -248,11 +249,11 @@ data class GitHubIssue(
val user: GitHubUser,
val state: GitHubIssueState,
@SerialName("locked") val isLocked: Boolean,
val body: String?,
val body: String? = null,
@SerialName("comments") val commentCount: Int,
val assignee: GitHubUser?,
val assignee: GitHubUser? = null,
val assignees: List<GitHubUser>,
val milestone: GitHubMilestone?,
val milestone: GitHubMilestone? = null,
@SerialName("created_at") val createdAt: Instant,
@SerialName("updated_at") val updatedAt: Instant,
@SerialName("closed_at") val closedAt: Instant? = null,
@@ -294,11 +295,11 @@ enum class GitHubUserType {
*/
@Serializable
data class GitHubUser(
val id: Long,
val login: String,
val type: GitHubUserType,
val id: Long? = null,
val login: String? = null,
val type: GitHubUserType? = null,
@SerialName("avatar_url")
val avatarUrl: String
val avatarUrl: String? = null
)

@Serializable
Original file line number Diff line number Diff line change
@@ -54,7 +54,7 @@ data class GitLabMergeRequest(
@SerialName("first_deployed_to_production_at")
val firstDeployedToProductionAt: Instant? = null,
@SerialName("force_remove_source_branch")
val forceRemoveSourceBranch: Boolean?,
val forceRemoveSourceBranch: Boolean? = null,
val id: Int,
val iid: Int,
@SerialName("latest_build_finished_at")
2 changes: 1 addition & 1 deletion danger-kotlin-library/version.gradle
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
group 'systems.danger'
version '1.3.0'
version '1.3.1'
2 changes: 1 addition & 1 deletion danger-kotlin-sample-plugin/build.gradle
Original file line number Diff line number Diff line change
@@ -9,7 +9,7 @@ buildscript {
}

plugins {
id 'org.jetbrains.kotlin.jvm' version '1.7.0'
id 'org.jetbrains.kotlin.jvm' version '1.7.22'
}

apply plugin: 'danger-kotlin-plugin-installer'
2 changes: 1 addition & 1 deletion danger-kotlin/src/runnerMain/kotlin/Main.kt
Original file line number Diff line number Diff line change
@@ -5,7 +5,7 @@ import systems.danger.cmd.Command
import systems.danger.cmd.dangerjs.DangerJS

const val PROCESS_DANGER_KOTLIN = "danger-kotlin"
const val VERSION = "1.3.0"
const val VERSION = "1.3.1"

fun main(args: Array<String>) {
Log.isVerbose = args.contains("--verbose") || (getenv("DEBUG")?.toString()?.isNotEmpty() ?: false)
2 changes: 1 addition & 1 deletion dependencyVersions.gradle
Original file line number Diff line number Diff line change
@@ -20,7 +20,7 @@ project.ext.groupIdOkio = 'com.squareup.okio'
project.ext.artifactIdOkio = 'okio'

// Kotlin
project.ext.versionKotlin = '1.7.0'
project.ext.versionKotlin = '1.7.22'
project.ext.groupIdKotlin = 'org.jetbrains.kotlin'
project.ext.groupIdKotlinx = 'org.jetbrains.kotlinx'
project.ext.artifactIdKotlinMain = 'kotlin-main-kts'
2 changes: 1 addition & 1 deletion github-action/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ghcr.io/danger/danger-kotlin:1.3.0
FROM ghcr.io/danger/danger-kotlin:1.3.1

COPY entrypoint.sh /entrypoint.sh

2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
kotlinVersion=1.7.0
kotlinVersion=1.7.22
kotlin.code.style=official
systemProp.org.gradle.internal.publish.checksums.insecure=true
6 changes: 3 additions & 3 deletions scripts/install.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/sh

VERSION=1.3.0
VERSION=1.3.1

while getopts v:h: flag
do
@@ -31,8 +31,8 @@ if [[ -n "$sudo" && "$OSTYPE" != "darwin"* ]]; then
fi

if ! [[ -x "$(command -v kotlinc)" ]]; then
echo "Installing kotlin compiler 1.7.0"
curl -o kotlin-compiler.zip -L https://github.com/JetBrains/kotlin/releases/download/v1.7.0/kotlin-compiler-1.7.0.zip
echo "Installing kotlin compiler 1.7.22"
curl -o kotlin-compiler.zip -L https://github.com/JetBrains/kotlin/releases/download/v1.7.22/kotlin-compiler-1.7.22.zip
unzip -d /usr/local/ kotlin-compiler.zip
echo 'export PATH=/usr/local/kotlinc/bin:$PATH' >> ~/.bash_profile
rm -rf kotlin-compiler.zip