Skip to content

Commit

Permalink
Merge pull request #62 from leanix/feature/CID-3367/validate-push-eve…
Browse files Browse the repository at this point in the history
…nt-is-enabled-for-GitHub-App

CID-3367: Validate push and installation event are enabled for GitHub App
  • Loading branch information
mohamedlajmileanix authored Dec 19, 2024
2 parents e6eef63 + 0bf67b8 commit c25c978
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 c25c978

Please sign in to comment.