From 90047b6ed307f6659600c1c469ccb32c5ed7a6f7 Mon Sep 17 00:00:00 2001 From: Satwik Miyyapuram Date: Tue, 1 Oct 2024 12:27:29 +0530 Subject: [PATCH] cleanup --- .github/workflows/main.yml | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 1af2f417..86374846 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -1,4 +1,4 @@ -name: Auto Pull Request on Push +name: Auto Pull Request for Current Branch on: push: @@ -13,19 +13,20 @@ jobs: - name: Checkout repository uses: actions/checkout@v3 - # Get current branch name + # Get the current branch name - name: Get branch name id: branch_name run: echo "::set-output name=branch::$(echo ${GITHUB_REF#refs/heads/})" + # Create a pull request comparing the current branch with itself - name: Create Pull Request uses: peter-evans/create-pull-request@v5 with: token: ${{ secrets.GITHUB_TOKEN }} - commit-message: "Auto-generated Pull Request from ${{ steps.branch_name.outputs.branch }}" - base: main # Target branch for PR (e.g., main, develop) - head: ${{ steps.branch_name.outputs.branch }} # The branch you just pushed to - title: "PR: ${{ steps.branch_name.outputs.branch }} to main" - body: "This PR was automatically generated after pushing to ${{ steps.branch_name.outputs.branch }}." + commit-message: "Automated Pull Request for changes on ${{ steps.branch_name.outputs.branch }}" + base: ${{ steps.branch_name.outputs.branch }} # Base is the current branch + head: ${{ steps.branch_name.outputs.branch }} # Head is also the current branch + title: "PR: Review changes on ${{ steps.branch_name.outputs.branch }}" + body: "This PR is automatically created to review the changes on branch: ${{ steps.branch_name.outputs.branch }}." reviewers: "" # Optional: Add reviewers labels: "auto-generated" # Optional: Add labels