Skip to content

Commit

Permalink
CID-3367: Validate push and installation event are enabled for GitHub…
Browse files Browse the repository at this point in the history
… App
  • Loading branch information
mohamedlajmileanix committed Dec 19, 2024
1 parent 7f6cdcf commit 0bf67b8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class GitHubEnterpriseService(private val githubClient: GitHubClient) {

companion object {
val expectedPermissions = listOf("administration", "contents", "metadata")
val expectedEvents = listOf("label", "public", "repository")
val expectedEvents = listOf("label", "public", "repository", "push", "installation")
}
private val logger = LoggerFactory.getLogger(GitHubEnterpriseService::class.java)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class GitHubEnterpriseServiceTest {
val githubApp = GitHubAppResponse(
slug = "validApp",
permissions = mapOf("administration" to "read", "contents" to "read", "metadata" to "read"),
events = listOf("label", "public", "repository")
events = listOf("label", "public", "repository", "push", "installation")
)
every { githubClient.getApp(any()) } returns githubApp

Expand All @@ -41,7 +41,7 @@ class GitHubEnterpriseServiceTest {
val response = GitHubAppResponse(
slug = "validApp",
permissions = mapOf("administration" to "read", "contents" to "read", "metadata" to "read"),
events = listOf("label", "public", "repository")
events = listOf("label", "public", "repository", "push", "installation")
)

assertDoesNotThrow { service.validateGithubAppResponse(response) }
Expand Down

0 comments on commit 0bf67b8

Please sign in to comment.