Learning center

Which permissions does a review worker need to publish a comment?

A process that reads source for analysis can use a read-only credential. Give the component that posts the approved result the write permission required by the publishing API, scoped to the intended repositories. Ask a candidate to show how it keeps those credentials apart.

Follow one result from worker to publisher#

A fictional bank trial has two repositories in one GitHub App installation. The analysis job for payment-sandbox needs to read its files and the pull request. The results publisher needs to submit a review there. The second repository has no job in this trial.

Use the candidate's non-production setup to examine each component's effective scope. Verify that the read credential can read the expected fixture files, cannot submit a review and cannot read the second private repository. Check that the publisher posts the result to the intended pull request. When an app requests an installation token, GitHub lets it name the repositories and permissions the token gets, within what the installation was granted. GitHub App installation token scoping · Create a GitHub pull request review

If the app workflow uses one credential for both operations, ask whether a read-only configuration can return findings to a person or a separate publisher. Choose the workflow that fits the actual permission split.

One month of free code review.

New organizations get one calendar month of hosted code review for private and public GitHub repositories. No card or cloud connection required. Eligibility and fair-use terms.

Start free with GitHub

Related reading