Skip to content

Commit c40e04a

Browse files
authored
Merge branch 'dev' into amitpjoshiem-patch-1
2 parents 2ae8951 + 4139dd0 commit c40e04a

File tree

2 files changed

+25
-19
lines changed

2 files changed

+25
-19
lines changed

.github/workflows/sync-dev-to-stage.yml

+24-18
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,6 @@ jobs:
1313
- name: Checkout
1414
uses: actions/checkout@v2
1515

16-
- name: Create auto-merge Label (if missing)
17-
uses: actions-ecosystem/action-create-label@v1
18-
with:
19-
github_token: ${{ secrets.PERSONAL_TOKEN }}
20-
label: auto-merge
21-
color: '#0e8a16'
22-
description: 'Auto-merge PRs with this label'
23-
2416
- name: Sync Branches (Create PR)
2517
uses: tretuna/sync-branches@1.4.0
2618
with:
@@ -31,16 +23,30 @@ jobs:
3123
PULL_REQUEST_BODY: "Automated PR to sync dev to stage."
3224
PULL_REQUEST_LABELS: "auto-merge"
3325

34-
auto-merge:
26+
sync-dev-to-stage:
3527
runs-on: ubuntu-latest
36-
needs: sync-branches
37-
3828
steps:
39-
- name: Auto-Merge PR
40-
uses: peter-evans/merge-pull-request@v3
29+
- name: Checkout Repository
30+
uses: actions/checkout@v3
4131
with:
42-
token: ${{ secrets.PERSONAL_TOKEN }}
43-
merge-method: squash # Change to merge, squash, or rebase
44-
labels: auto-merge
45-
commit-title: "Auto-merged dev into stage"
46-
commit-message: "Automatically merged PR from dev to stage."
32+
token: ${{ secrets.GITHUB_TOKEN }}
33+
fetch-depth: 0
34+
35+
- name: Set up Git identity
36+
run: |
37+
git config --local user.email "github-actions[bot]@users.noreply.github.com"
38+
git config --local user.name "github-actions[bot]"
39+
40+
- name: Fetch latest changes from origin
41+
run: |
42+
git fetch origin --prune
43+
44+
- name: Checkout stage branch and merge dev into it
45+
run: |
46+
git checkout stage || git checkout -b stage
47+
git pull origin stage --ff-only || true
48+
git merge --no-ff dev || true
49+
50+
- name: Push changes to origin/stage branch
51+
run: |
52+
git push origin stage --force-with-lease || echo "No changes to push"

pull_request_template.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
- [ ] Have you lint your code locally before submission?
1515
- [ ] The commit message follows our guidelines
1616
- [ ] Tests for the changes have been added (for bug fixes, features, docs update etc)
17-
- [ ] Approved by at least two developer: @amitpjoshiem, @ShubhamEngMind, @shreyashG13
17+
- [ ] Approved by at least two developer: @amitpjoshiem.
1818
- [ ] Ensure there aren't other open [Pull Requests](https://github.com/Engineersmind/Revi-backend/pulls) for the same update/change?
1919

2020
## Type of Change

0 commit comments

Comments
 (0)