diff --git a/src/main/kotlin/com/dsoftware/ghmanager/api/GetRunLogRequest.kt b/src/main/kotlin/com/dsoftware/ghmanager/api/GetRunLogRequest.kt index b5cd184b..8ce5619a 100644 --- a/src/main/kotlin/com/dsoftware/ghmanager/api/GetRunLogRequest.kt +++ b/src/main/kotlin/com/dsoftware/ghmanager/api/GetRunLogRequest.kt @@ -10,10 +10,10 @@ import java.nio.charset.StandardCharsets import java.util.TreeMap import java.util.zip.ZipInputStream -class GetRunLogRequest(url: String) : GithubApiRequest.Get(url) { - private lateinit var workflowInfo: GitHubLog +class GetRunLogRequest(url: String) : GithubApiRequest.Get(url) { + private lateinit var workflowInfo: WorkflowRunLog - override fun extractResult(response: GithubApiResponse): GitHubLog { + override fun extractResult(response: GithubApiResponse): WorkflowRunLog { LOG.debug("extracting result for $url") return response.handleBody { workflowInfo = extractFromStream(it) @@ -23,7 +23,7 @@ class GetRunLogRequest(url: String) : GithubApiRequest.Get(url) { companion object { private val LOG = logger() - fun extractFromStream(inputStream: InputStream): GitHubLog { + fun extractFromStream(inputStream: InputStream): WorkflowRunLog { val content = HashMap>() try { ZipInputStream(inputStream).use { diff --git a/src/main/kotlin/com/dsoftware/ghmanager/api/GithubApi.kt b/src/main/kotlin/com/dsoftware/ghmanager/api/GithubApi.kt index 44ad5bfe..81a079c1 100644 --- a/src/main/kotlin/com/dsoftware/ghmanager/api/GithubApi.kt +++ b/src/main/kotlin/com/dsoftware/ghmanager/api/GithubApi.kt @@ -1,6 +1,6 @@ package com.dsoftware.ghmanager.api -import com.dsoftware.ghmanager.api.model.WorkflowRunJobsList +import com.dsoftware.ghmanager.api.model.WorkflowRunJobs import com.dsoftware.ghmanager.api.model.WorkflowRuns import com.dsoftware.ghmanager.api.model.WorkflowTypes import com.dsoftware.ghmanager.data.RepositoryCoordinates @@ -18,16 +18,14 @@ data class WorkflowRunFilter( val event: String? = null, val workflowId: Long? = null, ) -typealias GitHubLog = Map> +typealias WorkflowRunLog = Map> object GithubApi : GithubApiRequests.Entity("/repos") { private val LOG = logger() - fun getDownloadUrlForWorkflowLog(url: String) = GetRunLogRequest(url) - .withOperationName("Download Workflow log") + fun getDownloadUrlForWorkflowLog(url: String) = GetRunLogRequest(url).withOperationName("Download Workflow log") - fun postUrl(name:String,url: String, data: Any = Object()) = - GithubApiRequest.Post.Json(url, data, Object::class.java, null) - .withOperationName(name) + fun postUrl(name: String, url: String, data: Any = Object()) = + GithubApiRequest.Post.Json(url, data, Object::class.java, null).withOperationName(name) fun getWorkflowTypes( coordinates: RepositoryCoordinates, @@ -66,7 +64,7 @@ object GithubApi : GithubApiRequests.Entity("/repos") { } - fun getWorkflowRunJobs(url: String) = get( + fun getWorkflowRunJobs(url: String) = get( url, "Get workflow-run jobs", pagination = GithubRequestPagination(1) ) diff --git a/src/main/kotlin/com/dsoftware/ghmanager/api/model/JobModel.kt b/src/main/kotlin/com/dsoftware/ghmanager/api/model/JobModel.kt index 7cd57599..854639d3 100644 --- a/src/main/kotlin/com/dsoftware/ghmanager/api/model/JobModel.kt +++ b/src/main/kotlin/com/dsoftware/ghmanager/api/model/JobModel.kt @@ -3,7 +3,7 @@ package com.dsoftware.ghmanager.api.model import com.fasterxml.jackson.annotation.JsonFormat import java.util.Date -data class WorkflowRunJobsList( +data class WorkflowRunJobs( val totalCount: Int, val jobs: List ) diff --git a/src/main/kotlin/com/dsoftware/ghmanager/data/DataProviders.kt b/src/main/kotlin/com/dsoftware/ghmanager/data/DataProviders.kt index c6061e16..4a766e98 100644 --- a/src/main/kotlin/com/dsoftware/ghmanager/data/DataProviders.kt +++ b/src/main/kotlin/com/dsoftware/ghmanager/data/DataProviders.kt @@ -1,8 +1,8 @@ package com.dsoftware.ghmanager.data -import com.dsoftware.ghmanager.api.GitHubLog +import com.dsoftware.ghmanager.api.WorkflowRunLog import com.dsoftware.ghmanager.api.GithubApi -import com.dsoftware.ghmanager.api.model.WorkflowRunJobsList +import com.dsoftware.ghmanager.api.model.WorkflowRunJobs import com.intellij.openapi.Disposable import com.intellij.openapi.diagnostic.thisLogger import com.intellij.openapi.progress.ProgressManager @@ -66,7 +66,7 @@ class WorkflowRunLogsDataProvider( progressManager: ProgressManager, requestExecutor: GithubApiRequestExecutor, logsUrl: String, -) : DataProvider( +) : DataProvider( progressManager, requestExecutor, GithubApi.getDownloadUrlForWorkflowLog(logsUrl), @@ -78,9 +78,9 @@ class WorkflowRunJobsDataProvider( progressManager: ProgressManager, requestExecutor: GithubApiRequestExecutor, jobsUrl: String -) : DataProvider( +) : DataProvider( progressManager, requestExecutor, GithubApi.getWorkflowRunJobs(jobsUrl), - WorkflowRunJobsList(0, emptyList()) + WorkflowRunJobs(0, emptyList()) ) \ No newline at end of file diff --git a/src/main/kotlin/com/dsoftware/ghmanager/data/JobsLoadingModelListener.kt b/src/main/kotlin/com/dsoftware/ghmanager/data/JobsLoadingModelListener.kt index 184a0914..81f9dc0d 100644 --- a/src/main/kotlin/com/dsoftware/ghmanager/data/JobsLoadingModelListener.kt +++ b/src/main/kotlin/com/dsoftware/ghmanager/data/JobsLoadingModelListener.kt @@ -1,6 +1,6 @@ package com.dsoftware.ghmanager.data -import com.dsoftware.ghmanager.api.model.WorkflowRunJobsList +import com.dsoftware.ghmanager.api.model.WorkflowRunJobs import com.intellij.collaboration.ui.SingleValueModel import com.intellij.openapi.Disposable import com.intellij.openapi.util.Disposer @@ -13,8 +13,8 @@ class JobsLoadingModelListener( dataProviderModel: SingleValueModel, runSelectionHolder: WorkflowRunListSelectionHolder, ) : GHLoadingModel.StateChangeListener { - val jobsModel = SingleValueModel(null) - val jobsLoadingModel = GHCompletableFutureLoadingModel(workflowRunDisposable) + val jobsModel = SingleValueModel(null) + val jobsLoadingModel = GHCompletableFutureLoadingModel(workflowRunDisposable) init { runSelectionHolder.addSelectionChangeListener(workflowRunDisposable, this::setValue) diff --git a/src/main/kotlin/com/dsoftware/ghmanager/data/LogLoadingModelListener.kt b/src/main/kotlin/com/dsoftware/ghmanager/data/LogLoadingModelListener.kt index 533031f6..542735e0 100644 --- a/src/main/kotlin/com/dsoftware/ghmanager/data/LogLoadingModelListener.kt +++ b/src/main/kotlin/com/dsoftware/ghmanager/data/LogLoadingModelListener.kt @@ -3,7 +3,7 @@ package com.dsoftware.ghmanager.data import com.dsoftware.ghmanager.Constants.LOG_MSG_JOB_IN_PROGRESS import com.dsoftware.ghmanager.Constants.LOG_MSG_MISSING import com.dsoftware.ghmanager.Constants.LOG_MSG_PICK_JOB -import com.dsoftware.ghmanager.api.GitHubLog +import com.dsoftware.ghmanager.api.WorkflowRunLog import com.dsoftware.ghmanager.api.model.Job import com.dsoftware.ghmanager.api.model.JobStep import com.intellij.collaboration.ui.SingleValueModel @@ -20,7 +20,7 @@ class LogLoadingModelListener( private val jobsSelectionHolder: JobListSelectionHolder, ) : GHLoadingModel.StateChangeListener { val logModel = SingleValueModel(null) - val logsLoadingModel = GHCompletableFutureLoadingModel(workflowRunDisposable) + val logsLoadingModel = GHCompletableFutureLoadingModel(workflowRunDisposable) init { jobsSelectionHolder.addSelectionChangeListener(workflowRunDisposable, this::setLogValue) diff --git a/src/main/kotlin/com/dsoftware/ghmanager/ui/panels/JobsListPanel.kt b/src/main/kotlin/com/dsoftware/ghmanager/ui/panels/JobsListPanel.kt index 6f11240e..bd37b00c 100644 --- a/src/main/kotlin/com/dsoftware/ghmanager/ui/panels/JobsListPanel.kt +++ b/src/main/kotlin/com/dsoftware/ghmanager/ui/panels/JobsListPanel.kt @@ -3,7 +3,7 @@ package com.dsoftware.ghmanager.ui.panels import com.dsoftware.ghmanager.actions.ActionKeys import com.dsoftware.ghmanager.api.model.Job -import com.dsoftware.ghmanager.api.model.WorkflowRunJobsList +import com.dsoftware.ghmanager.api.model.WorkflowRunJobs import com.dsoftware.ghmanager.data.WorkflowRunSelectionContext import com.dsoftware.ghmanager.ui.ToolbarUtil import com.intellij.collaboration.ui.SingleValueModel @@ -134,7 +134,7 @@ class JobListComponent( private val actionManager = ActionManager.getInstance() fun createJobsListComponent( - jobValueModel: SingleValueModel, + jobValueModel: SingleValueModel, runSelectionContext: WorkflowRunSelectionContext, infoInNewLine: Boolean, ): Pair { diff --git a/src/test/resources/branches.json b/src/test/resources/branches.json new file mode 100644 index 00000000..5ece5ded --- /dev/null +++ b/src/test/resources/branches.json @@ -0,0 +1,26 @@ +[ + { + "name": "detached", + "commit": { + "sha": "048dfc02d42e657199e636e0d60df56389a8078c", + "url": "https://api.github.com/repos/cunla/ghactions-manager/commits/048dfc02d42e657199e636e0d60df56389a8078c" + }, + "protected": false + }, + { + "name": "group_by_workflow", + "commit": { + "sha": "6e033c6e63d8b91e1430cce275110b4438d59f10", + "url": "https://api.github.com/repos/cunla/ghactions-manager/commits/6e033c6e63d8b91e1430cce275110b4438d59f10" + }, + "protected": false + }, + { + "name": "master", + "commit": { + "sha": "239789f77d6706067bd8dab32ec4155e1cfd9962", + "url": "https://api.github.com/repos/cunla/ghactions-manager/commits/239789f77d6706067bd8dab32ec4155e1cfd9962" + }, + "protected": true + } +] \ No newline at end of file diff --git a/src/test/resources/wf-run-jobs.json b/src/test/resources/wf-run-jobs.json new file mode 100644 index 00000000..0df91993 --- /dev/null +++ b/src/test/resources/wf-run-jobs.json @@ -0,0 +1,224 @@ +{ + "id": 7792954290, + "name": "Build", + "node_id": "WFR_kwLOHYewBs8AAAAB0H8Lsg", + "head_branch": "master", + "head_sha": "198fcd73a1808fb5949e3a31c47b97a81bab9426", + "path": ".github/workflows/build.yml", + "display_title": "fix:improve tests", + "run_number": 297, + "event": "push", + "status": "completed", + "conclusion": "success", + "workflow_id": 26673417, + "check_suite_id": 20472994453, + "check_suite_node_id": "CS_kwDOHYewBs8AAAAExEkalQ", + "url": "https://api.github.com/repos/cunla/ghactions-manager/actions/runs/7792954290", + "html_url": "https://github.com/cunla/ghactions-manager/actions/runs/7792954290", + "pull_requests": [ + + ], + "created_at": "2024-02-06T00:47:31Z", + "updated_at": "2024-02-06T00:51:26Z", + "actor": { + "login": "cunla", + "id": 3419721, + "node_id": "MDQ6VXNlcjM0MTk3MjE=", + "avatar_url": "https://avatars.githubusercontent.com/u/3419721?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/cunla", + "html_url": "https://github.com/cunla", + "followers_url": "https://api.github.com/users/cunla/followers", + "following_url": "https://api.github.com/users/cunla/following{/other_user}", + "gists_url": "https://api.github.com/users/cunla/gists{/gist_id}", + "starred_url": "https://api.github.com/users/cunla/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/cunla/subscriptions", + "organizations_url": "https://api.github.com/users/cunla/orgs", + "repos_url": "https://api.github.com/users/cunla/repos", + "events_url": "https://api.github.com/users/cunla/events{/privacy}", + "received_events_url": "https://api.github.com/users/cunla/received_events", + "type": "User", + "site_admin": false + }, + "run_attempt": 1, + "referenced_workflows": [ + + ], + "run_started_at": "2024-02-06T00:47:31Z", + "triggering_actor": { + "login": "cunla", + "id": 3419721, + "node_id": "MDQ6VXNlcjM0MTk3MjE=", + "avatar_url": "https://avatars.githubusercontent.com/u/3419721?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/cunla", + "html_url": "https://github.com/cunla", + "followers_url": "https://api.github.com/users/cunla/followers", + "following_url": "https://api.github.com/users/cunla/following{/other_user}", + "gists_url": "https://api.github.com/users/cunla/gists{/gist_id}", + "starred_url": "https://api.github.com/users/cunla/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/cunla/subscriptions", + "organizations_url": "https://api.github.com/users/cunla/orgs", + "repos_url": "https://api.github.com/users/cunla/repos", + "events_url": "https://api.github.com/users/cunla/events{/privacy}", + "received_events_url": "https://api.github.com/users/cunla/received_events", + "type": "User", + "site_admin": false + }, + "jobs_url": "https://api.github.com/repos/cunla/ghactions-manager/actions/runs/7792954290/jobs", + "logs_url": "https://api.github.com/repos/cunla/ghactions-manager/actions/runs/7792954290/logs", + "check_suite_url": "https://api.github.com/repos/cunla/ghactions-manager/check-suites/20472994453", + "artifacts_url": "https://api.github.com/repos/cunla/ghactions-manager/actions/runs/7792954290/artifacts", + "cancel_url": "https://api.github.com/repos/cunla/ghactions-manager/actions/runs/7792954290/cancel", + "rerun_url": "https://api.github.com/repos/cunla/ghactions-manager/actions/runs/7792954290/rerun", + "previous_attempt_url": null, + "workflow_url": "https://api.github.com/repos/cunla/ghactions-manager/actions/workflows/26673417", + "head_commit": { + "id": "198fcd73a1808fb5949e3a31c47b97a81bab9426", + "tree_id": "05bc84e0106035b67e9bccc7533e38b18ec52fa1", + "message": "fix:improve tests", + "timestamp": "2024-02-06T00:47:26Z", + "author": { + "name": "Daniel M", + "email": "daniel.maruani@gmail.com" + }, + "committer": { + "name": "Daniel M", + "email": "daniel.maruani@gmail.com" + } + }, + "repository": { + "id": 495431686, + "node_id": "R_kgDOHYewBg", + "name": "ghactions-manager", + "full_name": "cunla/ghactions-manager", + "private": false, + "owner": { + "login": "cunla", + "id": 3419721, + "node_id": "MDQ6VXNlcjM0MTk3MjE=", + "avatar_url": "https://avatars.githubusercontent.com/u/3419721?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/cunla", + "html_url": "https://github.com/cunla", + "followers_url": "https://api.github.com/users/cunla/followers", + "following_url": "https://api.github.com/users/cunla/following{/other_user}", + "gists_url": "https://api.github.com/users/cunla/gists{/gist_id}", + "starred_url": "https://api.github.com/users/cunla/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/cunla/subscriptions", + "organizations_url": "https://api.github.com/users/cunla/orgs", + "repos_url": "https://api.github.com/users/cunla/repos", + "events_url": "https://api.github.com/users/cunla/events{/privacy}", + "received_events_url": "https://api.github.com/users/cunla/received_events", + "type": "User", + "site_admin": false + }, + "html_url": "https://github.com/cunla/ghactions-manager", + "description": "A plugin to manage GitHub actions from JetBrains IDEs (intellij, pycharm, etc.)", + "fork": false, + "url": "https://api.github.com/repos/cunla/ghactions-manager", + "forks_url": "https://api.github.com/repos/cunla/ghactions-manager/forks", + "keys_url": "https://api.github.com/repos/cunla/ghactions-manager/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/cunla/ghactions-manager/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/cunla/ghactions-manager/teams", + "hooks_url": "https://api.github.com/repos/cunla/ghactions-manager/hooks", + "issue_events_url": "https://api.github.com/repos/cunla/ghactions-manager/issues/events{/number}", + "events_url": "https://api.github.com/repos/cunla/ghactions-manager/events", + "assignees_url": "https://api.github.com/repos/cunla/ghactions-manager/assignees{/user}", + "branches_url": "https://api.github.com/repos/cunla/ghactions-manager/branches{/branch}", + "tags_url": "https://api.github.com/repos/cunla/ghactions-manager/tags", + "blobs_url": "https://api.github.com/repos/cunla/ghactions-manager/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/cunla/ghactions-manager/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/cunla/ghactions-manager/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/cunla/ghactions-manager/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/cunla/ghactions-manager/statuses/{sha}", + "languages_url": "https://api.github.com/repos/cunla/ghactions-manager/languages", + "stargazers_url": "https://api.github.com/repos/cunla/ghactions-manager/stargazers", + "contributors_url": "https://api.github.com/repos/cunla/ghactions-manager/contributors", + "subscribers_url": "https://api.github.com/repos/cunla/ghactions-manager/subscribers", + "subscription_url": "https://api.github.com/repos/cunla/ghactions-manager/subscription", + "commits_url": "https://api.github.com/repos/cunla/ghactions-manager/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/cunla/ghactions-manager/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/cunla/ghactions-manager/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/cunla/ghactions-manager/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/cunla/ghactions-manager/contents/{+path}", + "compare_url": "https://api.github.com/repos/cunla/ghactions-manager/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/cunla/ghactions-manager/merges", + "archive_url": "https://api.github.com/repos/cunla/ghactions-manager/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/cunla/ghactions-manager/downloads", + "issues_url": "https://api.github.com/repos/cunla/ghactions-manager/issues{/number}", + "pulls_url": "https://api.github.com/repos/cunla/ghactions-manager/pulls{/number}", + "milestones_url": "https://api.github.com/repos/cunla/ghactions-manager/milestones{/number}", + "notifications_url": "https://api.github.com/repos/cunla/ghactions-manager/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/cunla/ghactions-manager/labels{/name}", + "releases_url": "https://api.github.com/repos/cunla/ghactions-manager/releases{/id}", + "deployments_url": "https://api.github.com/repos/cunla/ghactions-manager/deployments" + }, + "head_repository": { + "id": 495431686, + "node_id": "R_kgDOHYewBg", + "name": "ghactions-manager", + "full_name": "cunla/ghactions-manager", + "private": false, + "owner": { + "login": "cunla", + "id": 3419721, + "node_id": "MDQ6VXNlcjM0MTk3MjE=", + "avatar_url": "https://avatars.githubusercontent.com/u/3419721?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/cunla", + "html_url": "https://github.com/cunla", + "followers_url": "https://api.github.com/users/cunla/followers", + "following_url": "https://api.github.com/users/cunla/following{/other_user}", + "gists_url": "https://api.github.com/users/cunla/gists{/gist_id}", + "starred_url": "https://api.github.com/users/cunla/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/cunla/subscriptions", + "organizations_url": "https://api.github.com/users/cunla/orgs", + "repos_url": "https://api.github.com/users/cunla/repos", + "events_url": "https://api.github.com/users/cunla/events{/privacy}", + "received_events_url": "https://api.github.com/users/cunla/received_events", + "type": "User", + "site_admin": false + }, + "html_url": "https://github.com/cunla/ghactions-manager", + "description": "A plugin to manage GitHub actions from JetBrains IDEs (intellij, pycharm, etc.)", + "fork": false, + "url": "https://api.github.com/repos/cunla/ghactions-manager", + "forks_url": "https://api.github.com/repos/cunla/ghactions-manager/forks", + "keys_url": "https://api.github.com/repos/cunla/ghactions-manager/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/cunla/ghactions-manager/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/cunla/ghactions-manager/teams", + "hooks_url": "https://api.github.com/repos/cunla/ghactions-manager/hooks", + "issue_events_url": "https://api.github.com/repos/cunla/ghactions-manager/issues/events{/number}", + "events_url": "https://api.github.com/repos/cunla/ghactions-manager/events", + "assignees_url": "https://api.github.com/repos/cunla/ghactions-manager/assignees{/user}", + "branches_url": "https://api.github.com/repos/cunla/ghactions-manager/branches{/branch}", + "tags_url": "https://api.github.com/repos/cunla/ghactions-manager/tags", + "blobs_url": "https://api.github.com/repos/cunla/ghactions-manager/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/cunla/ghactions-manager/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/cunla/ghactions-manager/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/cunla/ghactions-manager/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/cunla/ghactions-manager/statuses/{sha}", + "languages_url": "https://api.github.com/repos/cunla/ghactions-manager/languages", + "stargazers_url": "https://api.github.com/repos/cunla/ghactions-manager/stargazers", + "contributors_url": "https://api.github.com/repos/cunla/ghactions-manager/contributors", + "subscribers_url": "https://api.github.com/repos/cunla/ghactions-manager/subscribers", + "subscription_url": "https://api.github.com/repos/cunla/ghactions-manager/subscription", + "commits_url": "https://api.github.com/repos/cunla/ghactions-manager/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/cunla/ghactions-manager/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/cunla/ghactions-manager/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/cunla/ghactions-manager/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/cunla/ghactions-manager/contents/{+path}", + "compare_url": "https://api.github.com/repos/cunla/ghactions-manager/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/cunla/ghactions-manager/merges", + "archive_url": "https://api.github.com/repos/cunla/ghactions-manager/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/cunla/ghactions-manager/downloads", + "issues_url": "https://api.github.com/repos/cunla/ghactions-manager/issues{/number}", + "pulls_url": "https://api.github.com/repos/cunla/ghactions-manager/pulls{/number}", + "milestones_url": "https://api.github.com/repos/cunla/ghactions-manager/milestones{/number}", + "notifications_url": "https://api.github.com/repos/cunla/ghactions-manager/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/cunla/ghactions-manager/labels{/name}", + "releases_url": "https://api.github.com/repos/cunla/ghactions-manager/releases{/id}", + "deployments_url": "https://api.github.com/repos/cunla/ghactions-manager/deployments" + } +} \ No newline at end of file diff --git a/src/test/resources/wf-run-logs.zip b/src/test/resources/wf-run-logs.zip new file mode 100644 index 00000000..f915f845 Binary files /dev/null and b/src/test/resources/wf-run-logs.zip differ diff --git a/src/test/resources/wf-run-single-job.log b/src/test/resources/wf-run-single-job.log new file mode 100644 index 00000000..e69de29b diff --git a/src/test/resources/workflow-runs.json b/src/test/resources/workflow-runs.json new file mode 100644 index 00000000..e69de29b diff --git a/src/test/resources/workflow-types.json b/src/test/resources/workflow-types.json new file mode 100644 index 00000000..086853ce --- /dev/null +++ b/src/test/resources/workflow-types.json @@ -0,0 +1,53 @@ +{ + "total_count": 4, + "workflows": [ + { + "id": 26673417, + "node_id": "W_kwDOHYewBs4BlwEJ", + "name": "Build", + "path": ".github/workflows/build.yml", + "state": "active", + "created_at": "2022-05-23T13:52:11.000Z", + "updated_at": "2022-05-23T13:52:11.000Z", + "url": "https://api.github.com/repos/cunla/ghactions-manager/actions/workflows/26673417", + "html_url": "https://github.com/cunla/ghactions-manager/blob/master/.github/workflows/build.yml", + "badge_url": "https://github.com/cunla/ghactions-manager/workflows/Build/badge.svg" + }, + { + "id": 26673418, + "node_id": "W_kwDOHYewBs4BlwEK", + "name": "Release", + "path": ".github/workflows/release.yml", + "state": "active", + "created_at": "2022-05-23T13:52:11.000Z", + "updated_at": "2022-05-23T13:52:11.000Z", + "url": "https://api.github.com/repos/cunla/ghactions-manager/actions/workflows/26673418", + "html_url": "https://github.com/cunla/ghactions-manager/blob/master/.github/workflows/release.yml", + "badge_url": "https://github.com/cunla/ghactions-manager/workflows/Release/badge.svg" + }, + { + "id": 26673419, + "node_id": "W_kwDOHYewBs4BlwEL", + "name": "Run UI Tests", + "path": ".github/workflows/run-ui-tests.yml", + "state": "active", + "created_at": "2022-05-23T13:52:11.000Z", + "updated_at": "2022-05-23T13:52:11.000Z", + "url": "https://api.github.com/repos/cunla/ghactions-manager/actions/workflows/26673419", + "html_url": "https://github.com/cunla/ghactions-manager/blob/master/.github/workflows/run-ui-tests.yml", + "badge_url": "https://github.com/cunla/ghactions-manager/workflows/Run%20UI%20Tests/badge.svg" + }, + { + "id": 75058074, + "node_id": "W_kwDOHYewBs4EeUua", + "name": "CodeQL", + "path": "dynamic/github-code-scanning/codeql", + "state": "active", + "created_at": "2023-11-05T15:42:23.000Z", + "updated_at": "2023-11-05T15:42:23.000Z", + "url": "https://api.github.com/repos/cunla/ghactions-manager/actions/workflows/75058074", + "html_url": "https://github.com/cunla/ghactions-manager/blob/master/dynamic/github-code-scanning/codeql", + "badge_url": "https://github.com/cunla/ghactions-manager/workflows/CodeQL/badge.svg" + } + ] +} \ No newline at end of file