From b4cef661e6128a9fa6be6755f2463ca13a873ae2 Mon Sep 17 00:00:00 2001 From: mrT23 Date: Wed, 28 May 2025 19:35:31 +0300 Subject: [PATCH 1/2] docs: enhance review.md with ticket compliance labels and merge blocking guidance --- docs/docs/tools/review.md | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/docs/docs/tools/review.md b/docs/docs/tools/review.md index 62d75634..56029c7f 100644 --- a/docs/docs/tools/review.md +++ b/docs/docs/tools/review.md @@ -152,8 +152,16 @@ extra_instructions = "..." - **`possible security issue`**: This label is applied if the tool detects a potential [security vulnerability](https://github.com/qodo-ai/pr-agent/blob/main/pr_agent/settings/pr_reviewer_prompts.toml#L103) in the PR's code. This feedback is controlled by the 'enable_review_labels_security' flag. - **`review effort [x/5]`**: This label estimates the [effort](https://github.com/qodo-ai/pr-agent/blob/main/pr_agent/settings/pr_reviewer_prompts.toml#L90) required to review the PR on a relative scale of 1 to 5, where 'x' represents the assessed effort. This feedback is controlled by the 'enable_review_labels_effort' flag. + - **`ticket compliance`**: Adds a label indicating code compliance level ("Fully compliant" | "PR Code Verified" | "Partially compliant" | "Not compliant") to any GitHub/Jira/Linea ticket linked in the PR. Controlled by the 'require_ticket_labels' flag (default: false). If 'require_no_ticket_labels' is also enabled, PRs without ticket links will receive a "No ticket found" label. - Note: The `possible security issue` label highlights potential security risks. You can configure a GitHub Action to [prevent merging](https://medium.com/sequra-tech/quick-tip-block-pull-request-merge-using-labels-6cc326936221) PRs that have this label. + +### Blocking PRs from merging based on the generated labels + +!!! tip "" + + You can configure a CI/CD Action to prevent merging PRs with specific labels. For example, implement a dedicated [GitHub Action](https://medium.com/sequra-tech/quick-tip-block-pull-request-merge-using-labels-6cc326936221). + This approach helps ensure PRs with potential security issues or ticket compliance problems will not be merged without further review. + Since AI may make mistakes or lack complete context, use this feature judiciously. For flexibility, users with appropriate permissions can remove generated labels when necessary. Any label removal will be documented in the PR discussion, clearly indicating it was a deliberate action by an authorized user to override the AI blocking the merge. ### Extra instructions From e9ce3ae8699c9da6a879f6249a9c0f5946f804f8 Mon Sep 17 00:00:00 2001 From: Tal Date: Wed, 28 May 2025 19:37:23 +0300 Subject: [PATCH 2/2] Update docs/docs/tools/review.md Co-authored-by: qodo-merge-pro-for-open-source[bot] <189517486+qodo-merge-pro-for-open-source[bot]@users.noreply.github.com> --- docs/docs/tools/review.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/docs/tools/review.md b/docs/docs/tools/review.md index 56029c7f..67b5f024 100644 --- a/docs/docs/tools/review.md +++ b/docs/docs/tools/review.md @@ -161,7 +161,7 @@ extra_instructions = "..." You can configure a CI/CD Action to prevent merging PRs with specific labels. For example, implement a dedicated [GitHub Action](https://medium.com/sequra-tech/quick-tip-block-pull-request-merge-using-labels-6cc326936221). This approach helps ensure PRs with potential security issues or ticket compliance problems will not be merged without further review. - Since AI may make mistakes or lack complete context, use this feature judiciously. For flexibility, users with appropriate permissions can remove generated labels when necessary. Any label removal will be documented in the PR discussion, clearly indicating it was a deliberate action by an authorized user to override the AI blocking the merge. + Since AI may make mistakes or lack complete context, use this feature judiciously. For flexibility, users with appropriate permissions can remove generated labels when necessary. When a label is removed, this action will be automatically documented in the PR discussion, clearly indicating it was a deliberate override by an authorized user to allow the merge. ### Extra instructions