Skip to content

Auto Merge Dev Branch #36

Auto Merge Dev Branch

Auto Merge Dev Branch #36

name: Auto Merge Dev Branch
on:
schedule:
- cron: '0 0 * * 1'
jobs:
create_pull_request:
permissions:
pull-requests: write
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Create pull request
run: |
title="Automatic PR: Merging dev into main ($(git rev-parse --short=7 remotes/origin/dev))"
body="
This pull request was automatically created by GitHub Actions, and it is automatically done every week. It merges all of the changes that have happened on the \`dev\` branch into the \`main\` branch.
The reason why the [\`dev\`](https://github.com/Atlas-OS/Atlas-Utilities/tree/dev) branch exists is to make sure that all of the code in [\`main\`](https://github.com/Atlas-OS/Atlas-Utilities) has been properly reviewed and approved. **Five contributors** have to approve this pull request for it to be merged.
**See here for more information:** https://docs.atlasos.net/contributions
**Last commit to [\`dev\`](https://github.com/Atlas-OS/Atlas-Utilities/tree/dev):** https://github.com/Atlas-OS/Atlas-Utilities/commit/$(git rev-parse remotes/origin/dev)
"
gitLog=$(git log main..remotes/origin/dev)
if [ -n "$gitLog" ]; then
gh pr create -B "main" -H "dev" --title "$title" -l "auto-pr" --body "$body"
fi
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}