From f4d8af2c59fba934589893ff19f6f00f16432b35 Mon Sep 17 00:00:00 2001 From: GREENRAT-K405 Date: Wed, 11 Feb 2026 15:14:27 +0530 Subject: [PATCH 1/3] add gemini ai pull request review --- .github/workflows/PR-review.yaml | 46 ++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 .github/workflows/PR-review.yaml diff --git a/.github/workflows/PR-review.yaml b/.github/workflows/PR-review.yaml new file mode 100644 index 0000000..83d480d --- /dev/null +++ b/.github/workflows/PR-review.yaml @@ -0,0 +1,46 @@ +name: AI Code Reviewer + +on: + issue_comment: + types: [created] + +permissions: + contents: read + pull-requests: write + issues: write + +jobs: + gemini-code-review: + runs-on: ubuntu-latest + if: | + github.event.issue.pull_request && + contains(github.event.comment.body, '/gemini-review') + steps: + - name: PR Info + run: | + echo "Comment: ${{ github.event.comment.body }}" + echo "Issue Number: ${{ github.event.issue.number }}" + echo "Repository: ${{ github.repository }}" + + - name: Checkout Repo + uses: actions/checkout@v3 + with: + fetch-depth: 0 + ref: refs/pull/${{ github.event.issue.number }}/head + + - name: Get PR Details + id: pr + run: | + PR_JSON=$(gh api repos/${{ github.repository }}/pulls/${{ github.event.issue.number }}) + echo "head_sha=$(echo $PR_JSON | jq -r .head.sha)" >> $GITHUB_OUTPUT + echo "base_sha=$(echo $PR_JSON | jq -r .base.sha)" >> $GITHUB_OUTPUT + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - uses: truongnh1992/gemini-ai-code-reviewer@main + with: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GEMINI_API_KEY: ${{ secrets.GEMINI_API_KEY }} + GEMINI_MODEL: gemini-2.5-flash + EXCLUDE: "*.md,*.txt,package-lock.json" + \ No newline at end of file From abb9ba0dbafb2e88cf36ea1896ec8f78af2fab9c Mon Sep 17 00:00:00 2001 From: GREENRAT-K405 Date: Thu, 12 Feb 2026 00:48:03 +0530 Subject: [PATCH 2/3] add greeings bot --- .github/workflows/PR-review.yaml | 46 -------------------------------- .github/workflows/greetings.yml | 41 ++++++++++++++++++++++++++++ 2 files changed, 41 insertions(+), 46 deletions(-) delete mode 100644 .github/workflows/PR-review.yaml create mode 100644 .github/workflows/greetings.yml diff --git a/.github/workflows/PR-review.yaml b/.github/workflows/PR-review.yaml deleted file mode 100644 index 83d480d..0000000 --- a/.github/workflows/PR-review.yaml +++ /dev/null @@ -1,46 +0,0 @@ -name: AI Code Reviewer - -on: - issue_comment: - types: [created] - -permissions: - contents: read - pull-requests: write - issues: write - -jobs: - gemini-code-review: - runs-on: ubuntu-latest - if: | - github.event.issue.pull_request && - contains(github.event.comment.body, '/gemini-review') - steps: - - name: PR Info - run: | - echo "Comment: ${{ github.event.comment.body }}" - echo "Issue Number: ${{ github.event.issue.number }}" - echo "Repository: ${{ github.repository }}" - - - name: Checkout Repo - uses: actions/checkout@v3 - with: - fetch-depth: 0 - ref: refs/pull/${{ github.event.issue.number }}/head - - - name: Get PR Details - id: pr - run: | - PR_JSON=$(gh api repos/${{ github.repository }}/pulls/${{ github.event.issue.number }}) - echo "head_sha=$(echo $PR_JSON | jq -r .head.sha)" >> $GITHUB_OUTPUT - echo "base_sha=$(echo $PR_JSON | jq -r .base.sha)" >> $GITHUB_OUTPUT - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - - uses: truongnh1992/gemini-ai-code-reviewer@main - with: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - GEMINI_API_KEY: ${{ secrets.GEMINI_API_KEY }} - GEMINI_MODEL: gemini-2.5-flash - EXCLUDE: "*.md,*.txt,package-lock.json" - \ No newline at end of file diff --git a/.github/workflows/greetings.yml b/.github/workflows/greetings.yml new file mode 100644 index 0000000..284c720 --- /dev/null +++ b/.github/workflows/greetings.yml @@ -0,0 +1,41 @@ +name: Greetings + +on: + pull_request_target: + types: [opened] + issues: + types: [opened] + +jobs: + greeting: + runs-on: ubuntu-latest + permissions: + issues: write + pull-requests: write + steps: + - uses: actions/first-interaction@v3 + with: + repo_token: ${{ secrets.GITHUB_TOKEN }} + + issue_message: | + 👋 Welcome to the Control-core Project, @${{ github.actor }}! Thank you for opening your first issue in concore-editor. + We appreciate your contribution to the organization and will review it as soon as possible. + + Before we get started, please check out these resources: + - 📚 [Project Documentation](https://control-core.readthedocs.io/) + - 📘 [Contribution Guidelines](https://github.com/ControlCore-Project/concore/blob/main/CONTRIBUTING.md) + - 📜 [Code of Conduct](https://github.com/ControlCore-Project/concore/blob/main/CODE_OF_CONDUCT.md) + + pr_message: | + 🎉 Welcome aboard, @${{ github.actor }}! Thank you for your first pull request in concore-editor. + + Please ensure that you are contributing to the **dev** branch. + + Your contribution means a lot to us. We'll review it shortly. + + Please ensure you have reviewed our: + - 📚 [Project Documentation](https://control-core.readthedocs.io/) + - 📘 [Contribution Guidelines](https://github.com/ControlCore-Project/concore/blob/main/CONTRIBUTING.md) + - 📜 [Code of Conduct](https://github.com/ControlCore-Project/concore/blob/main/CODE_OF_CONDUCT.md) + + If you have any questions, feel free to ask. Happy coding! \ No newline at end of file From 35a95d930be7ac28232d71a87c1d14f885ee6a8f Mon Sep 17 00:00:00 2001 From: PARAM KANADA Date: Thu, 12 Feb 2026 01:26:06 +0530 Subject: [PATCH 3/3] update uppercase/lowercase --- .github/workflows/greetings.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/greetings.yml b/.github/workflows/greetings.yml index 284c720..2e69e82 100644 --- a/.github/workflows/greetings.yml +++ b/.github/workflows/greetings.yml @@ -18,7 +18,7 @@ jobs: repo_token: ${{ secrets.GITHUB_TOKEN }} issue_message: | - 👋 Welcome to the Control-core Project, @${{ github.actor }}! Thank you for opening your first issue in concore-editor. + 👋 Welcome to the CONTROL-CORE Project, @${{ github.actor }}! Thank you for opening your first issue in concore-editor. We appreciate your contribution to the organization and will review it as soon as possible. Before we get started, please check out these resources: @@ -38,4 +38,4 @@ jobs: - 📘 [Contribution Guidelines](https://github.com/ControlCore-Project/concore/blob/main/CONTRIBUTING.md) - 📜 [Code of Conduct](https://github.com/ControlCore-Project/concore/blob/main/CODE_OF_CONDUCT.md) - If you have any questions, feel free to ask. Happy coding! \ No newline at end of file + If you have any questions, feel free to ask. Happy coding!