Add Jenkins job trigger and improve CI link handling#6
Open
etnt wants to merge 3 commits into
Open
Conversation
etnt
commented
May 14, 2026
- Add 'J' key binding to start a Jenkins PR pipeline build from the UI, with a confirmation dialog showing job name and branch details
- New py/jenkins.py module reads credentials from ~/.ghmanager_tokens (same as ghmanager) and triggers builds via Jenkins buildWithParameters API
- Auto-refresh PR after successful trigger to pick up new CI status
- Query dashboard API (dashboard.tail-f.com) for the latest build URL when pressing 'b', ensuring running builds are shown immediately
- Construct correct dashboard URL format with branch path and build ID
- Update help screen, CSS, config template, and README
There was a problem hiding this comment.
Pull request overview
Adds first-class Jenkins triggering and improves CI link freshness by integrating Jenkins build start and a dashboard API lookup into the prtui workflow.
Changes:
- Add
Jkeybinding + modal confirmation to trigger a Jenkins PR pipeline build from the UI. - Introduce
py/jenkins.pyto read~/.ghmanager_tokensand triggerbuildWithParametersvia Jenkins API. - Improve CI URL handling by querying
dashboard.tail-f.comfor the latest (including running) build URL.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| README.md | Documents Jenkins integration setup and usage. |
| py/prtui.tcss | Adds styling for the Jenkins confirmation modal. |
| py/prtui.py | Adds J binding, confirmation screen, Jenkins trigger workflow, and dashboard-based CI open behavior. |
| py/jenkins.py | New Jenkins client module: credential parsing, crumb fetch, and build trigger call. |
| py/ghapi.py | Adds dashboard CI URL lookup and prefers it when determining CI URL. |
Comments suppressed due to low confidence (1)
py/prtui.py:630
action_open_cinow performs a blocking HTTP request (ghapi.get_dashboard_ci_url(..., timeout=10)) on the UI thread. This can freeze the TUI while the request is in-flight or timing out. Consider moving the dashboard lookup into a background thread (similar toaction_refresh_pr) and then opening the URL fromcall_from_thread, or rely on the already-storedci_urlfrom the last refresh when possible.
table = self._focused_table()
pr = self.prs.get(table.id or "", [])[table.cursor_row]
# Try the dashboard API for the freshest build URL
url = ghapi.get_dashboard_ci_url(pr.get("head_ref"))
if not url:
url = store.get_ci_url(repo, int(number))
if not url:
self.notify("No CI link found", severity="warning")
return
webbrowser.open(url)
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Add 'J' key binding to start a Jenkins PR pipeline build from the UI, with a confirmation dialog showing job name and branch details - New py/jenkins.py module reads credentials from ~/.ghmanager_tokens (same as ghmanager) and triggers builds via Jenkins buildWithParameters API - Auto-refresh PR after successful trigger to pick up new CI status - Query dashboard API (dashboard.tail-f.com) for the latest build URL when pressing 'b', ensuring running builds are shown immediately - Construct correct dashboard URL format with branch path and build ID - Update help screen, CSS, config template, and README
- Add CI state column tracking: fetch combined commit status from GitHub to show ✓ (passed), ✗ (failed), or ◆ (running) in the CI column - Add ci_state column to DB with migration for existing databases - Re-fetch PRs with missing ci_state on poll to backfill existing rows - Fix crumb URL path (add leading slash) - Guard against None head_ref when opening CI links
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.