Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Nov 17, 2025

Disabled Jenkins jobs were appearing in list-jobs output and as inner jobs in get-job results, cluttering the display with non-actionable items.

Changes

  • listJobs(): Filter jobs where Color starts with "disabled" before display
  • getJob(): Filter disabled inner jobs in folders/multi-branch pipelines
  • MCP handlers: Apply same filtering to list_jobs and get_job tools

The filter catches both "disabled" and "disabled_anime" states via prefix matching:

enabledJobs := []gojenkins.InnerJob{}
for _, job := range jobs {
    if !strings.HasPrefix(job.Color, "disabled") {
        enabledJobs = append(enabledJobs, job)
    }
}
Original prompt

Do not print disabled jobs.


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Co-authored-by: alexec <1142830+alexec@users.noreply.github.com>
Copilot AI changed the title [WIP] Remove display of disabled jobs Filter disabled jobs from CLI and MCP server output Nov 17, 2025
Copilot AI requested a review from alexec November 17, 2025 00:44
@alexec alexec marked this pull request as ready for review November 17, 2025 00:45
@alexec alexec enabled auto-merge (squash) November 17, 2025 00:45
@alexec alexec merged commit cec8bda into main Nov 17, 2025
1 check passed
@alexec alexec deleted the copilot/remove-disabled-jobs-display branch November 17, 2025 00:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants