-
-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'upstream/master'
- Loading branch information
Showing
307 changed files
with
10,038 additions
and
4,427 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
name: Check merge to master | ||
|
||
on: | ||
pull_request_target: | ||
types: [ opened, synchronize, reopened ] | ||
branches: | ||
- 3.3.x | ||
|
||
jobs: | ||
merge-check: | ||
if: github.event_name == 'pull_request_target' && github.event.pull_request.base.ref == '3.3.x' | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout the repository | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 # Ensure full history is fetched | ||
|
||
- name: Set up Git user | ||
run: | | ||
git config --global user.name "github-actions" | ||
git config --global user.email "github-actions@github.com" | ||
- name: Fetch all branches | ||
run: git fetch origin | ||
|
||
- name: Simulate merging PR into 3.3.x | ||
id: simulate_merge | ||
run: | | ||
git checkout 3.3.x | ||
git fetch origin pull/${{ github.event.pull_request.number }}/head | ||
git merge --no-ff FETCH_HEAD || exit 1 | ||
- name: Attempt to merge updated 3.3.x into master | ||
id: merge_master | ||
run: | | ||
git checkout master | ||
if git merge --no-ff 3.3.x --no-commit; then | ||
echo "mergeable=true" >> $GITHUB_OUTPUT | ||
else | ||
echo "mergeable=false" >> $GITHUB_OUTPUT | ||
git merge --abort | ||
fi | ||
- name: Find Comment | ||
uses: peter-evans/find-comment@v3 | ||
id: fc | ||
with: | ||
issue-number: ${{ github.event.pull_request.number }} | ||
comment-author: 'github-actions[bot]' | ||
body-includes: The attempt to merge branch `3.3.x` into `master` has completed | ||
|
||
- name: Post comment on PR | ||
if: always() # Ensure this step always runs, regardless of merge result | ||
uses: peter-evans/create-or-update-comment@v4 | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
issue-number: ${{ github.event.pull_request.number }} | ||
comment-id: ${{ steps.fc.outputs.comment-id }} | ||
edit-mode: replace | ||
body: | | ||
The attempt to merge branch `3.3.x` into `master` has completed after considering the changes in this PR. | ||
- Merge result: ${{ steps.merge_master.outputs.mergeable == 'true' && 'Success ✅' || 'Conflict ❌' }} | ||
${{ steps.merge_master.outputs.mergeable == 'true' && 'This PR is ready to be merged.' || 'A separate PR will be needed to merge `3.3.x` into `master`.' }} | ||
- name: Mark job as succeeded | ||
if: always() | ||
run: echo "Merge check completed. Ignoring the result to avoid failed status." |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
name: Merge 3.3.x into master | ||
|
||
on: | ||
push: | ||
branches: | ||
- 3.3.x | ||
|
||
jobs: | ||
merge-branch: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/create-github-app-token@v1 | ||
id: app-token | ||
with: | ||
app-id: ${{ vars.MERGE_MASTER_APP_ID }} | ||
private-key: ${{ secrets.MERGE_MASTER_SECRET }} | ||
|
||
- name: Checkout the repository | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 # Fetch full history for proper merging | ||
ref: 3.3.x # Checkout the 3.3.x branch | ||
token: ${{ steps.app-token.outputs.token }} | ||
|
||
- name: Fetch the latest commit information | ||
id: get-commit-info | ||
run: | | ||
# Get the latest commit SHA and its author details | ||
COMMIT_SHA=$(git rev-parse HEAD) | ||
COMMIT_AUTHOR_NAME=$(git log -1 --pretty=format:'%an' $COMMIT_SHA) | ||
COMMIT_AUTHOR_EMAIL=$(git log -1 --pretty=format:'%ae' $COMMIT_SHA) | ||
# Save them as output for later steps | ||
echo "commit_sha=$COMMIT_SHA" >> $GITHUB_ENV | ||
echo "commit_author_name=$COMMIT_AUTHOR_NAME" >> $GITHUB_ENV | ||
echo "commit_author_email=$COMMIT_AUTHOR_EMAIL" >> $GITHUB_ENV | ||
- name: Set up Git with the pull request author's info | ||
run: | | ||
git config --global user.name "${{ env.commit_author_name }}" | ||
git config --global user.email "${{ env.commit_author_email }}" | ||
- name: Fetch all branches | ||
run: git fetch --all | ||
|
||
- name: Merge 3.3.x into master | ||
run: | | ||
git checkout master | ||
if git merge --no-ff 3.3.x; then | ||
echo "merge_failed=false" >> $GITHUB_ENV | ||
else | ||
echo "merge_failed=true" >> $GITHUB_ENV | ||
fi | ||
- name: Push changes to master if merge was successful | ||
if: env.merge_failed == 'false' | ||
run: git push origin master | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.