CodeIssuesDiscussionsWikiPull RequestsProjectsCommitsActionsReleasesContributorsPulse● GatesSecuritySettingsDeploymentsPipelineInsightsAgents✨ Explain✨ Ask AI✨ Workspace✨ Spec✨ Tests▓ Debt Map✨ NL Search🏛 Archaeology
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 | package com.gluecron.actions
import com.gluecron.GluecronUtil
import com.gluecron.settings.GluecronSettingsState
import com.intellij.notification.NotificationType
import com.intellij.openapi.actionSystem.AnAction
import com.intellij.openapi.actionSystem.AnActionEvent
import com.intellij.openapi.project.DumbAware
/**
* Opens a browser tab showing the repository health / CI dashboard.
*
* URL pattern: {host}/{owner}/{repo}/health
*
* The health page aggregates:
* - GateTest scan results from the most recent push
* - CI/CD pipeline status
* - Branch protection rule compliance
* - Open PR count and review coverage
*
* This is the JetBrains equivalent of the VS Code "gluecron.viewHealth" command,
* and mirrors the /admin/deploys live step stream mentioned in the project docs.
*/
class ViewHealthAction : AnAction(), DumbAware {
override fun actionPerformed(e: AnActionEvent) {
val project = e.project ?: return
val settings = GluecronSettingsState.getInstance()
val (owner, repo) = GluecronUtil.detectOwnerRepo(project)
?: run {
GluecronUtil.notify(
project,
"No Gluecron remote detected. Ensure the project has a git remote " +
"pointing to ${settings.host}.",
NotificationType.WARNING
)
return
}
val url = "${settings.host}/$owner/$repo/health"
GluecronUtil.openBrowser(url)
}
override fun update(e: AnActionEvent) {
e.presentation.isEnabledAndVisible = e.project != null
}
}
|