Skip to content

app/: linking a project to its repository, and checks and pull request comments on the forge (sc-8900) - #97

Merged
ndbroadbent merged 3 commits into
mainfrom
laravel-reports
Dec 3, 2026
Merged

ndbroadbent merged 3 commits into
mainfrom
laravel-reports

Conversation

@ndbroadbent

@ndbroadbent ndbroadbent commented Dec 2, 2026 •

Copy link
Copy Markdown
Member

Linking a project to its repository, then checks and pull request comments on the forge (sc-8900), merged as one PR before cutover. #95 was reviewed in its own PR and is closed as included here.

  • app/: linking a project to its repository (sc-8900, forge) #95, linking: forge::link::link_repository for GitHub (the App installed on the repository) and VisualCI's own GitLab (its bot). Only an admin or maintainer of the repository may link it, and the forge's permanent ID is stored. A repository belongs to one organization. A repository linked elsewhere matches by the forge's ID when it's known, and by URL only for links without one, so a new repository under a deleted one's name isn't moved. Self-managed GitLab instances are refused as unknown until sc-8634.
  • app/: linking a project to its repository, and checks and pull request comments on the forge (sc-8900) #97, checks and comments: BuildChanged queues forge::checks::ReportCheck (a GitHub check run, or a GitLab commit status through VisualCI's GitLab bot, per suite) and forge::pr_comment::PostPrComment (one comment per project and pull request, edited in place; no new comment when every suite is unchanged unless comment_when_unchanged is on). Both are debounced per build.
  • Review fixes:
    • Only one job at a time posts a build's check or a pull request's comment (advisory locks, with the build and the comment's row read under them).
    • A retry finds VisualCI's comment already on the pull request and edits it, instead of posting a second.
    • A rate limit (429, or GitHub's 403 for its limits) releases the job until the limit resets, instead of being read as missing permission.
    • The comment's hash leaves out its images' changing signatures.

Not in this PR: GitLab instances (#96, parked until sc-8634). Callers of link_repository (PATCH project over MCP and the web route) must check org admin; that's features' UI-pages PR.

fmt, clippy -D warnings and the full app suite pass on docspring-dev.

@ndbroadbent ndbroadbent changed the title app/: checks and pull request comments on the forge (sc-8900, forge) app/: linking a project to its repository, and checks and pull request comments on the forge (sc-8900) Dec 3, 2026
…orge::link::link_repository(project, by, url, token, move_link) for GitHub (the App installed on the repository) and the GitLab of VISUALCI_GITLAB_URL (VisualCI's bot a Developer, VISUALCI_GITLAB_BOT_TOKEN); only an admin or maintainer of the repository on the forge may link it; the forge's permanent ID is stored; a repository belongs to one organization: linked elsewhere is refused naming it, or with move_link moved here, unlinking the other projects with a notice and an email to their admins; an empty URL unlinks; both check the repository's open source status at once; self-managed GitLab instances are refused as unknown until they're ported
…it's known, by URL only for links without one (as server/ does): a new repository under a deleted one's name isn't moved or told
…ported): BuildChanged queues forge::checks::ReportCheck (a GitHub check run, or a GitLab commit status through VisualCI's GitLab bot, per suite) and forge::pr_comment::PostPrComment (one comment per project and pull request, edited in place), both debounced per build; one post at a time per build's check and per pull request's comment (advisory locks, read under them); a retry finds VisualCI's comment already on the pull request and edits it; a rate limit releases the job until it resets; the comment's hash leaves out its images' signatures; the comment's Markdown has golden files
@ndbroadbent
ndbroadbent changed the base branch from laravel-gitlab to main December 3, 2026 01:26
@ndbroadbent
ndbroadbent merged commit 7242d9f into main Dec 3, 2026
11 checks passed
@ndbroadbent
ndbroadbent deleted the laravel-reports branch December 3, 2026 01:40
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.

1 participant