Skip to content

Commit 967c17e

Browse files
Add workflow for automated PR creation
Co-authored-by: kodjima33 <kodjima33@gmail.com>
1 parent 24c2ee5 commit 967c17e

1 file changed

Lines changed: 40 additions & 0 deletions

File tree

.github/workflows/create-pr.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: Create Pull Request
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
branch:
7+
description: 'Branch name to create PR from'
8+
required: true
9+
default: 'cursor-test-1769836655'
10+
title:
11+
description: 'PR Title'
12+
required: true
13+
default: 'Test PR - Automated PR Creation Demo'
14+
base:
15+
description: 'Base branch'
16+
required: true
17+
default: 'main'
18+
19+
jobs:
20+
create-pr:
21+
runs-on: ubuntu-latest
22+
permissions:
23+
contents: read
24+
pull-requests: write
25+
26+
steps:
27+
- name: Checkout
28+
uses: actions/checkout@v4
29+
with:
30+
ref: ${{ github.event.inputs.branch }}
31+
32+
- name: Create Pull Request
33+
env:
34+
GH_TOKEN: ${{ github.token }}
35+
run: |
36+
gh pr create \
37+
--title "${{ github.event.inputs.title }}" \
38+
--body "This is a test pull request created automatically to demonstrate the PR creation workflow. This PR can be safely closed or merged." \
39+
--base "${{ github.event.inputs.base }}" \
40+
--head "${{ github.event.inputs.branch }}"

0 commit comments

Comments
 (0)