feat(pasteCI): add hook pasting failing CI output to the pull request - #45
Open
Osheun wants to merge 1 commit into
Open
feat(pasteCI): add hook pasting failing CI output to the pull request#45Osheun wants to merge 1 commit into
Osheun wants to merge 1 commit into
Conversation
Contributor
|
Thanks for opening this PR! |
|
@Osheun is attempting to deploy a commit to the Caleb's Projects Team on Vercel. A member of the Team first needs to authorize it. |
Contributor
|
Note All commit messages follow Conventional Commits standard. |
Osheun
force-pushed
the
feat/pasteci-hook
branch
from
August 19, 2026 06:01
5e90920 to
dc80e61
Compare
Contributor
|
Note All commits and the PR title adhere to the Conventional Commits specification. Good to go! |
On workflow_run.completed with a failure conclusion, downloads the logs of each failed job and pastes their tail into a single updatable PR comment. When CI passes again the same comment is refreshed. Adds the workflow_run event and actions: read permission to app.yml. Closes calebephrem#3
Osheun
force-pushed
the
feat/pasteci-hook
branch
from
August 20, 2026 20:47
dc80e61 to
cc22a6a
Compare
Owner
|
just discovered this approach breaks on forked prs due to empty payload and log stream redirects, so it's probably not worth adding rn |
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.
What
New
pasteCIhook, as requested in #3. Onworkflow_run.completedwith afailureconclusion, it:lineslines (capped at ~6k chars per job to stay far below GitHub's 65k comment limit)<details>block per failed job, with a direct link to the jobThe comment is a single updatable comment (hidden
<!-- hookto-paste-ci -->mark): later runs update it in place, and when CI passes again it is refreshed to say so instead of leaving stale failure output. If logs are expired/inaccessible, the failed job is still listed. Runs without an attached PR (e.g. forked PRs, where GitHub sends an emptypull_requestsarray) are skipped.Config
Default exactly as specified in the issue, plus an optional
linesknob:Changes
src/app/hooks/pasteCI/index.ts+schema.tssrc/schemas/hooks.tsHOOKS.md(including the fork limitation)app.yml: subscribes toworkflow_runand addsactions: read(required to read job logs) — existing deployments need to add these on their GitHub App settings page for the hook to worktests/app/hooks/pasteCI.test.ts(9 tests: paste, line/timestamp trimming, comment update, success refresh, silent success, missing logs, no PR, disabled)Closes #3