Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
satwik-miyyapuram-cohesity committed Oct 1, 2024
1 parent 917f64a commit 90047b6
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Auto Pull Request on Push
name: Auto Pull Request for Current Branch

on:
push:
Expand All @@ -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

0 comments on commit 90047b6

Please sign in to comment.