Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
ostrich-egg committed Apr 22, 2024
2 parents 740cb2f + 60e3d46 commit 16b86b9
Showing 1 changed file with 17 additions and 5 deletions.
22 changes: 17 additions & 5 deletions .github/workflows/auto_merge.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
name: Merge to Base
name: Auto Merge Pull Request

on:
push:
branches:
- main # Adjust this according to your main branch name in your forked repository
- main

jobs:
merge_to_base:
auto_merge:
runs-on: ubuntu-latest

steps:
Expand All @@ -22,8 +22,20 @@ jobs:
uses: peter-evans/create-pull-request@v3
with:
token: ${{ secrets.PAT_TOKEN }}
branch: master # Adjust this according to your main branch name in your forked repository
base: main # Adjust this according to your main branch name in the base repository
branch: master
base: main
title: Automatically generated PR
body: |
This pull request was automatically generated by a GitHub Action.
- name: Get Pull Request Number
id: pr_number
run: echo "::set-output name=number::$(jq -r '.number' $GITHUB_EVENT_PATH)"

- name: Merge Pull Request
run: |
PR_NUMBER="${{ steps.pr_number.outputs.number }}"
curl -X PUT \
-H "Authorization: token ${{ secrets.PAT_TOKEN }}" \
-H "Accept: application/vnd.github.v3+json" \
"https://api.github.com/repos/Adarsha16/CodeRoom/pulls/$PR_NUMBER/merge"

0 comments on commit 16b86b9

Please sign in to comment.