v1.13.0

GitLab code review, switched off until it is turned on

GitLab code review

siGit Code Review now has a third forge. A signed-in person can link a gitlab.com project from Settings by pasting the project path and a reviewer token. The token belongs to the customer and needs only the Developer role, so the reviewer can comment and approve but never push code. Linking needs the Maintainer role on the project, because it adds a webhook, and a one-time GitLab authorization creates that hook. siGit keeps the hook's secrets and the reviewer token, encrypted, and drops the authorization token once the hook exists.

A linked project is reviewed when a merge request is opened or reopened, when new commits are pushed, and when a draft is marked ready. Mentioning the reviewer in the description, a comment or a line comment asks for a review or a reply. Replies in a thread the reviewer started are answered, and a merge request is approved once every finding is settled. GitLab sends no event when someone resolves a thread, so a background check looks for merge requests whose last open finding was just resolved.

Webhooks are checked against the link's secret and, once a link has a signing secret, against the signature GitLab sends. A repeated delivery is ignored. The first siGit account to link a project holds it, and reviews are billed to that account.

Each day the reviewer token is rotated if it is close to expiring, and the link's role and permissions are checked again. A link that fails the check shows the reason on the admin Code Review page.

GitLab review has its own switch on that page, and the switch is off. Nothing changes for anyone until it is turned on.

Code review

  • A re-approval of a change that was already approved now says it still looks good, instead of repeating the first approval.
  • A change that only touches lockfiles is reviewed when someone asks for it.

Admin

The admin Code Review page shows whether the job worker is running and how many jobs are waiting. The deploy notes now describe how systemd supervises the worker.

Security

Rails, msgpack and puma are updated for published advisories.