diff --git a/docs/automation-actions.md b/docs/automation-actions.md index 7dde8c868..0d0e1f285 100644 --- a/docs/automation-actions.md +++ b/docs/automation-actions.md @@ -304,14 +304,16 @@ automations: args: approve_on_LGTM: {{ APPROVE_PR_ON_LGTM }} # optional arg, you can remove it guidelines: {{ GUIDELINES | dump }} -... -... -# Define variables -APPROVE_PR_ON_LGTM: false # Add conditions for PR approvals. For example - allow approval only for specific users +# Define variables +# Add conditions for PR approvals. For example - allow approval only for specific users +APPROVE_PR_ON_LGTM: false +# Add your prompts to the review GUIDELINES: | - Don't comment on using outdated dependencies - + - In Javascript + - Make sure camelCase is used for variable names + - Make sure PascalCase is used for class names ``` The following files are automatically excluded from the code review. diff --git a/docs/automations/integrations/LinearBAI/code-review/README.md b/docs/automations/integrations/LinearBAI/code-review/README.md index 574ea08db..cc04fb207 100644 --- a/docs/automations/integrations/LinearBAI/code-review/README.md +++ b/docs/automations/integrations/LinearBAI/code-review/README.md @@ -22,6 +22,7 @@ Use LinearB's AI with the [`code-review`](/automation-actions/#code-review) acti Automation Actions: * Perform an AI-driven code review and append the review comments to the PR. + * Use `guidelines` to add your prompts to the team or org review === "For GitHub" @@ -58,8 +59,21 @@ Use LinearB's AI with the [`code-review`](/automation-actions/#code-review) acti [:octicons-download-24: Download this example as a CM file.](/downloads/automation-library/integrations/LinearBAI/code-review-bb.cm){ .md-button } + +!!! tip "`./REVIEW_RULES.md` example" + + This file should be created in your repo root: + + ``` + 1. Do not comment on missing documentation. + 2. Do not comment on missing tests. + 3. For JavaScript code, enforce using camelCase for variables and functions. + ``` + + + ## Additional Resources --8<-- "docs/snippets/general.md" diff --git a/docs/downloads/automation-library/integrations/LinearBAI/code-review-bb.cm b/docs/downloads/automation-library/integrations/LinearBAI/code-review-bb.cm index 5b8664813..bfdc532d2 100644 --- a/docs/downloads/automation-library/integrations/LinearBAI/code-review-bb.cm +++ b/docs/downloads/automation-library/integrations/LinearBAI/code-review-bb.cm @@ -9,5 +9,14 @@ automations: - action: code-review@v1 args: approve_on_LGTM: {{ APPROVE_PR_ON_LGTM }} # optional arg, you can remove it + guidelines: {{ GUIDELINES }} -APPROVE_PR_ON_LGTM: false # you can add conditions for PR approvals. For example - allowing approvals only for specific users +# Define variables +# Add conditions for PR approvals. For example - allow approval only for specific users +APPROVE_PR_ON_LGTM: false + +# Add `guidelines` to add your prompts to the review, you can have org wide instructions +# by placing the `REVIEW_RULES.md` in the `cm` repo or team level instructions by adding it to +# the team repo. +# Note: To when the file is in the `cm` repo, use this example: `../cm/REVIEW_RULES.md` +GUIDELINES: {{ "./REVIEW_RULES.md" | readFile() | dump }} diff --git a/docs/downloads/automation-library/integrations/LinearBAI/code-review-gl.cm b/docs/downloads/automation-library/integrations/LinearBAI/code-review-gl.cm index b69460859..f5f3fdee2 100644 --- a/docs/downloads/automation-library/integrations/LinearBAI/code-review-gl.cm +++ b/docs/downloads/automation-library/integrations/LinearBAI/code-review-gl.cm @@ -10,5 +10,14 @@ automations: - action: code-review@v1 args: approve_on_LGTM: {{ APPROVE_PR_ON_LGTM }} # optional arg, you can remove it + guidelines: {{ GUIDELINES }} -APPROVE_PR_ON_LGTM: false # you can add conditions for PR approvals. For example - allowing approvals only for specific users +# Define variables +# Add conditions for PR approvals. For example - allow approval only for specific users +APPROVE_PR_ON_LGTM: false + +# Add `guidelines` to add your prompts to the review, you can have org wide instructions +# by placing the `REVIEW_RULES.md` in the `cm` repo or team level instructions by adding it to +# the team repo. +# Note: To when the file is in the `cm` repo, use this example: `../cm/REVIEW_RULES.md` +GUIDELINES: {{ "./REVIEW_RULES.md" | readFile() | dump }} diff --git a/docs/downloads/automation-library/integrations/LinearBAI/code-review.cm b/docs/downloads/automation-library/integrations/LinearBAI/code-review.cm index 2b97d42c0..ca8cbfa61 100644 --- a/docs/downloads/automation-library/integrations/LinearBAI/code-review.cm +++ b/docs/downloads/automation-library/integrations/LinearBAI/code-review.cm @@ -14,5 +14,14 @@ automations: - action: code-review@v1 args: approve_on_LGTM: {{ APPROVE_PR_ON_LGTM }} # optional arg, you can remove it + guidelines: {{ GUIDELINES }} -APPROVE_PR_ON_LGTM: false # you can add conditions for PR approvals. For example - allowing approvals only for specific users +# Define variables +# Add conditions for PR approvals. For example - allow approval only for specific users +APPROVE_PR_ON_LGTM: false + +# Add `guidelines` to add your prompts to the review, you can have org wide instructions +# by placing the `REVIEW_RULES.md` in the `cm` repo or team level instructions by adding it to +# the team repo. +# Note: To when the file is in the `cm` repo, use this example: `../cm/REVIEW_RULES.md` +GUIDELINES: {{ "./REVIEW_RULES.md" | readFile() | dump }} diff --git a/docs/integrations/LB_AI.md b/docs/integrations/LB_AI.md index 0441c4b8a..d6e2e05a4 100644 --- a/docs/integrations/LB_AI.md +++ b/docs/integrations/LB_AI.md @@ -9,14 +9,14 @@ category: [quality, genai, copilot, tests, efficiency] ## Automation Examples -### Add PR Description Using LinearB's AI :material-star-circle: - ---8<-- "docs/automations/integrations/LinearBAI/describe-pr/README.md:example" - ### Use LinearB's AI for a comprehensive Code Review :material-star-circle: --8<-- "docs/automations/integrations/LinearBAI/code-review/README.md:example" +### Add PR Description Using LinearB's AI :material-star-circle: + +--8<-- "docs/automations/integrations/LinearBAI/describe-pr/README.md:example" + ## Additional Resources --8<-- "docs/snippets/general.md"