From 8e7b80da1a525841858d258b4a231df81760d2bc Mon Sep 17 00:00:00 2001 From: kurone-kito Date: Sun, 24 Mar 2024 21:27:08 +0900 Subject: [PATCH 1/3] ci: migrated the AI based review engine configuration migrated from ReviewPad to CodeRabbit --- .coderabbit.yaml | 10 ++++ .gitattributes | 2 +- .vscode/settings.json | 4 +- cspell.config.yml | 1 + reviewpad.yml | 107 ------------------------------------------ 5 files changed, 14 insertions(+), 110 deletions(-) create mode 100644 .coderabbit.yaml delete mode 100644 reviewpad.yml diff --git a/.coderabbit.yaml b/.coderabbit.yaml new file mode 100644 index 0000000..7f7a6da --- /dev/null +++ b/.coderabbit.yaml @@ -0,0 +1,10 @@ +chat: + auto_reply: true +early_access: true +language: en +reviews: + auto_review: + enabled: true + path_instructions: + - instructions: Some files look broken, but they contain templates from Scriban. Please review with this in mind. + path: Website/**/* diff --git a/.gitattributes b/.gitattributes index f1d6b7b..97c8db6 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,4 +1,4 @@ +.coderabbit.yaml export-ignore .gitattributes export-ignore .github export-ignore .gitignore export-ignore -reviewpad.yml export-ignore diff --git a/.vscode/settings.json b/.vscode/settings.json index b6f14f1..7059d0f 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,8 +1,8 @@ { "git.branchProtection": ["main"], "yaml.schemas": { - "https://raw.githubusercontent.com/reviewpad/schemas/main/latest/schema.json": [ - "reviewpad.yml" + "https://coderabbit.ai/integrations/coderabbit-overrides.v2.json": [ + ".coderabbit.yaml" ], "https://raw.githubusercontent.com/streetsidesoftware/cspell/main/packages/cspell-types/cspell.schema.json": [ "cspell.config.yml" diff --git a/cspell.config.yml b/cspell.config.yml index ac51d54..89f796e 100644 --- a/cspell.config.yml +++ b/cspell.config.yml @@ -16,6 +16,7 @@ ignorePaths: words: - kito - kuroné + - scriban - udonsharp useGitignore: true version: '0.2' diff --git a/reviewpad.yml b/reviewpad.yml deleted file mode 100644 index f5ead07..0000000 --- a/reviewpad.yml +++ /dev/null @@ -1,107 +0,0 @@ -labels: - small: - description: Pull request is small - color: '#76dbbe' - medium: - description: Pull request is medium - color: '#2986cc' - large: - description: Pull request is large - color: '#c90076' -metrics-on-merge: true -workflows: - # This workflow calls Reviewpad AI agent to summarize the pull request. - - name: summarize - description: Summarize the pull request - run: - # Summarize the pull request on pull request synchronization. - - if: ($eventType() == "synchronize" || $eventType() == "opened") && $state() == "open" - then: $summarize() - - # This workflow assigns the most relevant reviewer to pull requests. - # This helps guarantee that most pull requests are reviewed by at least one person. - - name: reviewer-assignment - description: Assign the most relevant reviewer to pull requests - run: - # Automatically assign reviewer when the pull request is ready for review; - - if: $isDraft() == false - then: $assignCodeAuthorReviewers() - - # This workflow praises contributors on their pull request contributions. - # This helps contributors feel appreciated. - - name: praise-contributors-on-milestones - description: Praise contributors based on their contributions - run: - # Praise contributors on their first pull request. - - if: $pullRequestCountBy($author()) == 1 - then: $commentOnce($sprintf("Thank you @%s for this first contribution!", [$author()])) - - # This workflow validates that pull requests follow the conventional commits specification. - # This helps developers automatically generate changelogs. - # For more details, see https://www.conventionalcommits.org/en/v1.0.0/. - - name: check-conventional-commits - description: Validate that pull requests follow the conventional commits - run: - - if: $isDraft() == false - then: - # Check commits messages against the conventional commits specification - - $commitLint() - - # This workflow validates best practices for pull request management. - # This helps developers follow best practices. - - name: best-practices - description: Validate best practices for pull request management - run: - # Warn pull requests if their description is empty. - - if: $description() == "" - then: $warn("Please provide a description for the pull request") - # Warn pull request do not have a clean linear history. - - if: $hasLinearHistory() == false - then: $warn("Please rebase your pull request on the latest changes") - - # This workflow labels pull requests based on the total number of lines changed. - # This helps pick pull requests based on their size and to incentivize small pull requests. - - name: size-labeling - description: Label pull request based on the number of lines changed - run: - - if: $size() < 100 - then: $addLabel("small") - else: $removeLabel("small") - - if: $size() >= 100 && $size() < 300 - then: $addLabel("medium") - else: $removeLabel("medium") - - if: $size() >= 300 - then: $addLabel("large") - else: $removeLabel("large") - - # This workflow signals pull requests waiting for reviews. - # This helps guarantee that pull requests are reviewed and approved by at least one person. - - name: check-approvals - description: Check that pull requests have the required number of approvals - run: - # Label pull requests with `waiting-for-review` if there are no approvals; - - if: $isDraft() == false && $approvalsCount() < 1 - then: $addLabel("waiting-for-review") - - # This workflow labels pull requests based on the pull request change type. - # This helps pick pull requests based on their change type. - - name: change-type-labelling - description: Label pull requests based on the type of changes - run: - # Label pull requests with `docs` if they only modify Markdown or txt files. - - if: $hasFileExtensions([".md", ".txt"]) - then: $addLabel("docs") - else: $removeLabel("docs") - # Label pull requests with `dependencies` if they only modify `package.json` and `package.lock` files. - - if: $hasFileExtensions(["package.json", "yarn.lock"]) - then: $addLabel("dependencies") - else: $removeLabel("dependencies") - - # This workflow validates that pull requests do not contain changes to the license. - # This helps avoid unwanted license modifications. - - name: license-validation - description: Validate that licenses are not modified - run: - # Fail Reviewpad check on pull requests that modify any LICENSE; - - if: $hasFilePattern("**/LICENSE*") - then: $fail("License files cannot be modified") From 66d6f27f1fabedaf6fbe967208c133e7eb1e644d Mon Sep 17 00:00:00 2001 From: kurone-kito Date: Sun, 24 Mar 2024 21:48:29 +0900 Subject: [PATCH 2/3] ci: added the Dependabot configuration --- .github/dependabot.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 .github/dependabot.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..0bbf125 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,12 @@ +version: 2 +updates: + - directory: / + labels: + - dependencies + package-ecosystem: github-actions + reviewers: + - kurone-kito + assignees: + - kurone-kito + schedule: + interval: monthly From c0d9b5430304dffa2d036fa10bfccf66750ebb29 Mon Sep 17 00:00:00 2001 From: kurone-kito Date: Wed, 27 Mar 2024 21:50:22 +0900 Subject: [PATCH 3/3] feat: added the repository --- source.json | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/source.json b/source.json index b6f42a3..1ba1d19 100644 --- a/source.json +++ b/source.json @@ -13,6 +13,10 @@ "text": "View on GitHub" }, "bannerUrl": "banner.png", - "githubRepos": ["kurone-kito/udonsharp-toybox", "kurone-kito/vrc-ui"], + "githubRepos": [ + "kurone-kito/launchpad-icons", + "kurone-kito/udonsharp-toybox", + "kurone-kito/vrc-ui" + ], "packages": [] }