Skip to content

Commit 15dfa90

Browse files
Merge pull request #18 from mindfiredigital/master
Merge master into main
2 parents 0d49d32 + 76931b5 commit 15dfa90

File tree

2 files changed

+39
-24
lines changed

2 files changed

+39
-24
lines changed
Lines changed: 38 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,49 @@
1-
name: Prepare Release PR
1+
name: Create PR from master to main
22

33
on:
4-
workflow_dispatch:
54
push:
65
branches:
76
- master
87

9-
# Add this permissions block
10-
permissions:
11-
contents: write
12-
pull-requests: write
13-
148
jobs:
15-
create_release_pr:
9+
create-pull-request:
1610
runs-on: ubuntu-latest
11+
permissions:
12+
contents: write
13+
pull-requests: write
1714
steps:
18-
- uses: actions/checkout@v4
15+
- name: Checkout code
16+
uses: actions/checkout@v3
1917
with:
2018
fetch-depth: 0
21-
# Add this line to use the token for authentication
22-
token: ${{ secrets.GITHUB_TOKEN }}
23-
- run: |
24-
git config user.name "GitHub Actions"
25-
git config user.email "actions@github.com"
26-
git checkout -b release-main
27-
git push origin release-main --force
28-
- uses: peter-evans/create-pull-request@v5
29-
with:
30-
base: main
31-
title: "Automated Release PR: release-main -> main"
32-
body: "Automated release changes."
33-
branch: release-main
34-
token: ${{ secrets.GITHUB_TOKEN }}
19+
ref: master
20+
21+
- name: Set Git Identity
22+
run: |
23+
git config --global user.name 'GitHub Actions'
24+
git config --global user.email 'github-actions@github.com'
25+
26+
- name: Create Pull Request with gh cli
27+
env:
28+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
29+
run: |
30+
# We're already on master, just need to fetch main
31+
git fetch origin main:refs/remotes/origin/main
32+
33+
# Check if there are differences between main and master
34+
DIFF_COUNT=$(git rev-list --count origin/main..HEAD)
35+
36+
if [ "$DIFF_COUNT" -gt 0 ]; then
37+
echo "Differences found between main and master. Creating PR..."
38+
39+
# Use GitHub CLI to create the PR
40+
gh pr create \
41+
--base main \
42+
--head master \
43+
--title "Merge master into main" \
44+
--body "This is an automated PR to merge changes from master into main branch." || true
45+
46+
echo "Pull request created or already exists."
47+
else
48+
echo "No differences found between main and master. Skipping PR creation."
49+
fi

readme.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<h1 align="center">python-fm-dapi-weaver</h1><br>
22

3-
A Developer-Friendly Python library for interacting with FileMaker Server via the FileMaker Data API. Connect your apps to FileMaker databases for streamlined data management, automation, and integration
3+
A developer-friendly Python library for interacting with FileMaker Server via the FileMaker Data API. Connect your apps to FileMaker databases for streamlined data management, automation, and integration
44

55
## Table of Contents
66

0 commit comments

Comments
 (0)