Pull requests
A pull request proposes a change on its own branch of the project repository and merges it into the default branch after review. In Codinamo, pull requests are opened for pipeline definitions: the proposed ICE source is committed to a new branch instead of the default branch.
Before you start
-
The project needs a hosted repository with at least one commit on its default branch. See Hosted Git repositories.
-
Opening, merging, and closing a pull request require write access to the repository. Browse access is enough to read pull requests. See Access catalog.
Open a pull request
Pull requests are opened from the pipeline editor.
-
Open the pipeline in the editor and make your changes.
-
Select Commit.
-
In the Commit pipeline dialog, choose Open a pull request.
-
Fill in Pull request title and Description. Branch (optional) names the source branch; leave it empty to have one generated, such as
pr/build-deploy-20261125-a3f9. -
Select Open pull request.
Codinamo creates the branch from the current default branch, commits the pipeline source to it with you as the author, and opens the pull request page. The source must be valid ICE; an invalid definition is rejected with its diagnostics.
A branch name may contain letters, digits, ., _, -, and /. If the branch already exists, choose another name or add the change to its pull request.
Add commits to an open pull request
When the repository has open pull requests, the Commit pipeline dialog also lists Commit to open branch of PR #N for each of them. Choose one and select Add commit.
Commits pushed with Git to the source branch update the pull request right away, and its review runs again for the new head.
A new commit clears the approvals already given, so reviewers approve the latest change.
Find pull requests
Open the project and select the Pull requests tab. Each row shows the number and title, the source and target branches, and the status:
| Status | Meaning |
|---|---|
|
Waiting for review and merge. New commits can still be added. |
|
Merged into the target branch. |
|
Closed without merging. |
Read a pull request
The page header shows the title, author, commit and file counts, the base and head commits, and the source and target branches. The rail on the left switches between Conversation and each entry under Changed files.
Conversation contains:
-
Description: the text given when the pull request was opened.
-
Validations: the checks described below. Select a row to expand its details.
-
Activity: the timeline of commits, reviewers added, approvals with their comments, Raico reviews, and the merge or close event.
Selecting a file under Changed files shows its diff with line numbers and the count of added and removed lines. A very large diff is truncated, and the header says so.
Validations
| Validation | What it reports |
|---|---|
No conflicts |
Whether the head merges cleanly into the target branch. On conflict it lists the conflicting files. It is computed on every page load. |
Validation |
The result of the validation pipeline chosen by the target branch, for the current head. Shown only when the branch chose one. See Validate pull requests with a pipeline. |
Raico review |
The state of the Raico review of the current head. Shown only when the pull request has a Raico review. |
Review |
Approvals given out of the approvals required. |
After a pull request is merged or closed, the page keeps the validations as they were at that moment.
Validate pull requests with a pipeline
Each branch chooses the pipeline that validates the pull requests it receives. A pull request runs at most one validation pipeline: the one chosen by its target branch. Several branches can share the same pipeline.
-
Declare in the pipeline’s ICE that it can validate pull requests:
@triggers { manual: {} pullRequest: {} } -
Open the project, select Source and, in Branches, select Add branch (or Edit on a listed branch).
-
Choose the Validation pipeline. Only pipelines of the project that declare
pullRequest: {}are listed. -
Keep Require a successful run of the latest commit before merging on to block the merge until the run passes, or turn it off to show the result without blocking.
The pipeline runs when the pull request is opened and on every new commit, whether added in the web app or pushed with Git. The run belongs to the person who caused the change and receives CODINAMO_TRIGGER=pull_request, CODINAMO_BRANCH (source branch), CODINAMO_COMMIT_SHA (head), CODINAMO_BASE_SHA, CODINAMO_TARGET_BRANCH and CODINAMO_PULL_REQUEST_NUMBER.
Changing a branch’s validation needs the permission to manage the repository, so a pull request cannot turn off its own validation. If the chosen pipeline is deleted or loses pullRequest: {}, merges into the branch stay blocked until someone chooses another pipeline or removes the validation. Branches that are not listed have no validation.
With codi:
codi repository branch list backend
codi repository branch update backend main --validation-pipeline ci-validate
codi repository branch update backend develop --validation-pipeline ci-validate --require-success false
codi repository branch update backend develop --validation-pipeline none
Request and give a review
Expand the Review validation to manage reviewers. The author and users with write access to the repository can:
-
add a reviewer by email with Add. The reviewer must be a Codinamo user and cannot be the author;
-
remove a reviewer;
-
set Required approvals from
0 (optional)to3.
An assigned reviewer sees a comment box and the Approve button in the same place. The comment is optional and appears in Activity with the approval. The header shows Awaiting review while approvals are missing and Approved once they are complete.
Approval is the only review decision. Review comments are attached to an approval; there are no separate conversation comments or comments on diff lines.
Raico findings
When Raico reviews the pull request, its findings appear in the Activity timeline and inline in the diff, under the line they refer to. Each file in the rail shows its count of open findings. While the pull request is open, select Resolve or Won’t fix on a finding to close it.
See Raico for how reviews are enabled and what the findings mean.
Merge
Select Merge pull request. The source branch is merged into the target branch with you as the author of the merge: the target branch is fast-forwarded when possible; otherwise a merge commit is created. The source branch is kept.
The button is disabled, with the reasons in its tooltip, while any of these apply:
-
a validation is failing, for example No conflicts or Tests passed;
-
Required approvals is greater than zero and the approvals are incomplete;
-
the project has Require resolved Raico findings to merge enabled and the Raico review of the latest commit has not finished without open findings.
To resolve a conflict, bring the source branch up to date with the target branch using Git and push it, then reopen the page. If the source branch received commits since the page was loaded, the merge is refused; reload the page to review the new head first.
Close without merging
Select Close to end a pull request without merging it. The branch and its commits stay in the repository, and the pull request remains in the list as CLOSED.
Require pull requests
To make pull requests mandatory, select Edit project and enable Require pull request for pipeline changes. The Commit to the default branch option is then disabled in the editor, and direct pushes to the default branch are rejected. See the branch protection section of Hosted Git repositories.
Require resolved Raico findings to merge is set on the same page.
Use the CLI
codi pipeline update --pr opens a pull request, and codi pr list, show, merge, and close cover the rest of the flow from the terminal. See Work with Codi.