From e67b46473ff3aaf746c9709142651c6e0e7b0d99 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=2E=20Fatih=20C=C4=B1r=C4=B1t?= Date: Thu, 6 Jun 2024 22:53:04 +0300 Subject: [PATCH 1/5] feat: add ai pr review docs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: M. Fatih Cırıt --- .../pull-request-guidelines/.pages | 1 + .../pull-request-guidelines/ai-pr-review.md | 49 +++++++++++++++++++ 2 files changed, 50 insertions(+) create mode 100644 docs/contributing/pull-request-guidelines/ai-pr-review.md diff --git a/docs/contributing/pull-request-guidelines/.pages b/docs/contributing/pull-request-guidelines/.pages index 02f9550f958..5613ee5c790 100644 --- a/docs/contributing/pull-request-guidelines/.pages +++ b/docs/contributing/pull-request-guidelines/.pages @@ -1,5 +1,6 @@ nav: - index.md + - ai-pr-review.md - ci-checks.md - code-owners.md - commit-guidelines.md diff --git a/docs/contributing/pull-request-guidelines/ai-pr-review.md b/docs/contributing/pull-request-guidelines/ai-pr-review.md new file mode 100644 index 00000000000..349e7994efe --- /dev/null +++ b/docs/contributing/pull-request-guidelines/ai-pr-review.md @@ -0,0 +1,49 @@ +# AI PR Review + +We have [Codium-ai/pr-agent](https://github.com/Codium-ai/pr-agent/tree/main) enabled for Autoware Universe repository. + +## The workflow + +Workflow: [pr-agent.yaml](https://github.com/autowarefoundation/autoware.universe/blob/main/.github/workflows/pr-agent.yaml) + +### Additional links for the workflow maintainers + +- [Available models list](https://github.com/Codium-ai/pr-agent/blob/main/pr_agent/algo/__init__.py) + +## How to use + +When you create the PR, or within the PR add the label `tag:pr-agent`. + +Wait until both PR-Agent jobs are completed successfully: +- `prevent-no-label-execution-pr-agent / prevent-no-label-execution` +- `Run pr agent on every pull request, respond to user comments` + +!!! warning + + If you add multiple labels at the same time, `prevent-no-label-execution` can get confused. + For example, first add `tag:pr-agent`, wait until it is ready, then add `tag:run-build-and-test-differential` if you need it. + +Then you can pick one of the following commands: + +``` +/review: Request a review of your Pull Request. +/describe: Update the PR description based on the contents of the PR. +/improve: Suggest code improvements. +/ask Could you propose a better name for this parameter?: Ask a question about the PR or anything really. +/update_changelog: Update the changelog based on the PR's contents. +/add_docs: Generate docstring for new components introduced in the PR. +/help: Get a list of all available PR-Agent tools and their descriptions. +``` + +- [Here is the official documentation](https://pr-agent-docs.codium.ai/tools/). +- [Usage Guide](https://pr-agent-docs.codium.ai/usage-guide/automations_and_usage/#online-usage) + +To use it, [drop a comment post within your PR like this](https://github.com/Codium-ai/pr-agent/pull/229#issuecomment-1695021901). + +Within a minute, you should see 👀 reaction under your comment post. + +Then the bot will drop a response with reviews, description or an answer. + +!!! info + + Please drop a single PR-Agent related comment at a time. From 5cc678b468fb922fdde51f053ec7cafe4540665d Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Thu, 6 Jun 2024 19:57:05 +0000 Subject: [PATCH 2/5] style(pre-commit): autofix --- docs/contributing/pull-request-guidelines/ai-pr-review.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/contributing/pull-request-guidelines/ai-pr-review.md b/docs/contributing/pull-request-guidelines/ai-pr-review.md index 349e7994efe..705a1ca20b7 100644 --- a/docs/contributing/pull-request-guidelines/ai-pr-review.md +++ b/docs/contributing/pull-request-guidelines/ai-pr-review.md @@ -15,6 +15,7 @@ Workflow: [pr-agent.yaml](https://github.com/autowarefoundation/autoware.univers When you create the PR, or within the PR add the label `tag:pr-agent`. Wait until both PR-Agent jobs are completed successfully: + - `prevent-no-label-execution-pr-agent / prevent-no-label-execution` - `Run pr agent on every pull request, respond to user comments` From 2f298009389e7b61a2eb9c79c2f9a603e4c8a945 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=2E=20Fatih=20C=C4=B1r=C4=B1t?= Date: Thu, 6 Jun 2024 23:02:19 +0300 Subject: [PATCH 3/5] mark code block as text MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: M. Fatih Cırıt --- docs/contributing/pull-request-guidelines/ai-pr-review.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/contributing/pull-request-guidelines/ai-pr-review.md b/docs/contributing/pull-request-guidelines/ai-pr-review.md index 705a1ca20b7..d4db7483ce6 100644 --- a/docs/contributing/pull-request-guidelines/ai-pr-review.md +++ b/docs/contributing/pull-request-guidelines/ai-pr-review.md @@ -26,7 +26,7 @@ Wait until both PR-Agent jobs are completed successfully: Then you can pick one of the following commands: -``` +```text /review: Request a review of your Pull Request. /describe: Update the PR description based on the contents of the PR. /improve: Suggest code improvements. From bc1c573ffc31b0ce761473a51d4a52dd1b13c8da Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=2E=20Fatih=20C=C4=B1r=C4=B1t?= Date: Thu, 6 Jun 2024 23:16:06 +0300 Subject: [PATCH 4/5] add linebreak MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: M. Fatih Cırıt --- docs/contributing/pull-request-guidelines/ai-pr-review.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/contributing/pull-request-guidelines/ai-pr-review.md b/docs/contributing/pull-request-guidelines/ai-pr-review.md index d4db7483ce6..732b65eea1a 100644 --- a/docs/contributing/pull-request-guidelines/ai-pr-review.md +++ b/docs/contributing/pull-request-guidelines/ai-pr-review.md @@ -22,6 +22,7 @@ Wait until both PR-Agent jobs are completed successfully: !!! warning If you add multiple labels at the same time, `prevent-no-label-execution` can get confused. + For example, first add `tag:pr-agent`, wait until it is ready, then add `tag:run-build-and-test-differential` if you need it. Then you can pick one of the following commands: From 69f39eadf4c25d0613ac30ad4bb5c6b2df54f566 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Thu, 6 Jun 2024 20:16:34 +0000 Subject: [PATCH 5/5] style(pre-commit): autofix --- docs/contributing/pull-request-guidelines/ai-pr-review.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/contributing/pull-request-guidelines/ai-pr-review.md b/docs/contributing/pull-request-guidelines/ai-pr-review.md index 732b65eea1a..704e5fdf105 100644 --- a/docs/contributing/pull-request-guidelines/ai-pr-review.md +++ b/docs/contributing/pull-request-guidelines/ai-pr-review.md @@ -22,7 +22,7 @@ Wait until both PR-Agent jobs are completed successfully: !!! warning If you add multiple labels at the same time, `prevent-no-label-execution` can get confused. - + For example, first add `tag:pr-agent`, wait until it is ready, then add `tag:run-build-and-test-differential` if you need it. Then you can pick one of the following commands: