From a35896fb4e85ae0cd6b2484c02bf0f25d14dd2e3 Mon Sep 17 00:00:00 2001 From: Thales Raymond <32554150+thalesraymond@users.noreply.github.com> Date: Sun, 14 Jun 2026 15:52:24 -0300 Subject: [PATCH 1/2] =?UTF-8?q?ci:=20=F0=9F=8E=A1=20enable=20jules=20pr=20?= =?UTF-8?q?review?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/jules-pr-review.yml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 .github/workflows/jules-pr-review.yml diff --git a/.github/workflows/jules-pr-review.yml b/.github/workflows/jules-pr-review.yml new file mode 100644 index 0000000..2934fd5 --- /dev/null +++ b/.github/workflows/jules-pr-review.yml @@ -0,0 +1,21 @@ +name: Jules PR Review +on: + pull_request: + types: [opened, synchronize, reopened, ready_for_review] + +concurrency: + group: jules-review-${{ github.event.pull_request.number }} + cancel-in-progress: true + +jobs: + review: + runs-on: ubuntu-latest + permissions: + pull-requests: write + contents: read + statuses: write + steps: + - uses: sanjay3290/jules-pr-reviewer@v1 + with: + jules_api_key: ${{ secrets.JULES_API_KEY }} + github_token: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file From e34e655e2a68f5cb0e2aa1895b6c9a1611720466 Mon Sep 17 00:00:00 2001 From: Thales Raymond <32554150+thalesraymond@users.noreply.github.com> Date: Sun, 14 Jun 2026 15:54:39 -0300 Subject: [PATCH 2/2] =?UTF-8?q?ci:=20=F0=9F=8E=A1=20auto=20pr=20creation?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/auto-pr.yml | 54 +++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 .github/workflows/auto-pr.yml diff --git a/.github/workflows/auto-pr.yml b/.github/workflows/auto-pr.yml new file mode 100644 index 0000000..47a9f17 --- /dev/null +++ b/.github/workflows/auto-pr.yml @@ -0,0 +1,54 @@ +name: Auto Create PR + +on: + push: + branches: + - 'feat/**' + - 'fix/**' + - 'bug/**' + - 'docs/**' + - 'style/**' + - 'refactor/**' + - 'perf/**' + - 'test/**' + - 'build/**' + - 'ci/**' + - 'chore/**' + - 'revert/**' + +permissions: + pull-requests: write + contents: read + +jobs: + create-pr: + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Check and create PR + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + BRANCH_NAME="${GITHUB_REF#refs/heads/}" + + # Check if an open PR already exists from this branch to main + PR_COUNT=$(gh pr list --head "$BRANCH_NAME" --base main --state open --json id --jq 'length') + + if [ "$PR_COUNT" -eq 0 ]; then + echo "No open PR found for branch '$BRANCH_NAME'. Creating one..." + + # Format the title (e.g., 'feat/my-feature' -> 'feat: my feature') + TITLE=$(echo "$BRANCH_NAME" | sed -E 's|^([^/]+)/(.*)|\1: \2|' | tr '-' ' ') + + gh pr create \ + --head "$BRANCH_NAME" \ + --base main \ + --title "$TITLE" \ + --body "Automated PR created from branch \`$BRANCH_NAME\`." + + echo "PR created successfully." + else + echo "An open PR already exists for branch '$BRANCH_NAME'. Skipping PR creation." + fi