feat(github): GitHub Actions tool window with job logs and re-runs (#6767)

Adds a GitHub Actions tool window listing the workflow runs of the current branch (including its pull request runs), with a toggle for every branch. Expanding a run lists its jobs; selecting a job shows its log with runner timestamps and group markers removed and error lines highlighted. The toolbar has Re-run Failed Jobs, Re-run All Jobs, Re-run Job, Open in Browser and Refresh, and the list refreshes every 15 seconds while anything runs.

gh 2.104 refuses to print responses containing terminal escape sequences unless --allow-escape-sequences is passed; ide_github::api retries a GET with the flag only when gh refused for that reason, so older gh versions keep working.

resetConnection now clears a GitHub check still running for the previous project, which left the connection stuck in "checking" after switching projects.

The tool window uses the github icon (the build tool window already uses toolwindow-build), and "GitHub Actions" is kept untranslated in zh.

Closes #6716

Co-authored-by: wildcatDownstairs <[email protected]>
Цей коміт міститься в:
LU XIANGRUIтаwildcatDownstairs authored and GitHub committed 2026-11-29 13:59:25 +08:00
1 джерело f8a9b204c6
коміт 7ab456b1e7
19 files changed
+672 -10

No files matched your search

+25
Переглянути файл
@@ -253,3 +253,28 @@ describe("GitHub Enterprise Server hosts beside github.com", () => {
]);
});
});
describe("switching projects", () => {
it("does not leave the reset state checking when a check of the old project was running", async () => {
let answer!: () => void;
ghAvailability.mockReturnValue(
new Promise((r) => {
answer = () =>
r({
status: "ok",
data: {
kind: "ready",
repo: { nameWithOwner: "org/android", url: "https://github.com/org/android" },
login: "me",
},
});
}),
);
const stale = refreshConnection();
await vi.waitFor(() => expect(ghAvailability).toHaveBeenCalled());
resetConnection();
answer();
await stale;
expect(useGhRepository.getState()).toMatchObject({ availability: null, checking: false, connection: null });
});
});
+8 -1
Переглянути файл
@@ -319,7 +319,14 @@ export function resetConnection() {
checkSeq++;
localRemotes = [];
disconnect({ forget: false });
useGhRepository.setState({ availability: null, remotes: [], defaultRemote: null, connectionError: null });
// A check still running belongs to the old project and will not finish this one's.
useGhRepository.setState({
availability: null,
checking: false,
remotes: [],
defaultRemote: null,
connectionError: null,
});
}
/** The connection, or throws (for operations that only run while connected). */