Skip to content
This repository has been archived by the owner on Dec 14, 2023. It is now read-only.

Commit

Permalink
fix: wrong type definition on PingEvent
Browse files Browse the repository at this point in the history
  • Loading branch information
AH-dark committed Dec 9, 2023
1 parent aa57a44 commit 358483e
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 27 deletions.
38 changes: 23 additions & 15 deletions src/main/kotlin/com/ahdark/code/entities/github/webhook/Hook.kt
Original file line number Diff line number Diff line change
Expand Up @@ -5,25 +5,33 @@ import kotlinx.serialization.Serializable

@Serializable
data class Hook(
val type: String,
val id: Long,
val name: String,
val active: Boolean,
@SerialName("app_id")
val appId: Int,
val events: List<String>,
val config: HookConfig,

@SerialName("app_id")
val appID: Long? = null,

@SerialName("updated_at")
val updatedAt: String,

@SerialName("created_at")
val createdAt: String,

val url: String,

@SerialName("test_url")
val testURL: String,

@SerialName("ping_url")
val pingURL: String,

@SerialName("deliveries_url")
val deliveriesUrl: String,
val events: List<String>,
val id: Int,
val deliveriesURL: String,

@SerialName("last_response")
val lastResponse: LastResponse,
val name: String,
@SerialName("ping_url")
val pingUrl: String,
@SerialName("test_url")
val testUrl: String,
val type: String,
@SerialName("updated_at")
val updatedAt: String,
val url: String
val lastResponse: LastResponse
)
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,10 @@ import kotlinx.serialization.Serializable
data class HookConfig(
@SerialName("content_type")
val contentType: String,

@SerialName("insecure_ssl")
val insecureSsl: Int,

val secret: String,
val url: String
)
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package com.ahdark.code.entities.github.webhook

import kotlinx.serialization.SerialName
import kotlinx.serialization.Serializable
import kotlinx.serialization.json.JsonElement


@Serializable
Expand Down Expand Up @@ -220,13 +219,10 @@ data class Repository(
@SerialName("default_branch")
val defaultBranch: String,

val stargazers: Long,
val stargazers: Long? = null,

@SerialName("master_branch")
val masterBranch: String,
val masterBranch: String? = null,

val organization: String? = null,

@SerialName("custom_properties")
val customProperties: JsonElement? = null
)
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
package com.ahdark.code.entities.github.webhook.events

import com.ahdark.code.entities.github.webhook.Hook
import com.ahdark.code.entities.github.webhook.Organization
import com.ahdark.code.entities.github.webhook.Repository
import com.ahdark.code.entities.github.webhook.Sender
import kotlinx.serialization.SerialName
import kotlinx.serialization.Serializable

@Serializable
data class PingEvent(
val hook: Hook,
val zen: String,

@SerialName("hook_id")
val hookId: Long,
val organization: Organization,
val hookID: Long,

val hook: Hook,
val repository: Repository,
val sender: Sender,
val zen: String
val sender: Sender
)

0 comments on commit 358483e

Please sign in to comment.