Skip to content

Commit

Permalink
feat(ci): Retarget non next>master PRs to next
Browse files Browse the repository at this point in the history
Closes #776
  • Loading branch information
AleksandarDev committed Dec 16, 2023
1 parent f5ec17a commit f30c78b
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 1 deletion.
20 changes: 19 additions & 1 deletion .github/workflows/global-sync-next-branch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,17 @@ on:
push:
branches:
- main
pull_request:
branches:
- main
workflow_dispatch:

concurrency: merge_main

jobs:
merge-branch:
# When a PR is merged into main, attempt to merge main into next
sync-next-branch:
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
steps:
- name: Checkout 🛎
Expand All @@ -31,3 +36,16 @@ jobs:
run: gh pr merge --merge --auto "${{ steps.cpr.outputs.pr_number }}"
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# Retarget to next branch if PR is opened against main (and head is not next)
retarget-feature-prs:
if: github.event_name == 'pull_request' && github.event.action == 'opened' && github.base_ref == 'main' && github.head_ref != 'next'
runs-on: ubuntu-latest
steps:
- name: Checkout 🛎
uses: actions/checkout@v4
- name: Change PR target
run: gh pr edit ${{ github.event.number }} --base next
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}


4 changes: 4 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,7 @@ _NOTE: In-app contact form is still in development. Use GitHub issues for action
You can contribute and help us localize the app.

We are investigating how to simplify localization, but for now you can contribute by creating a Pull-Request with changes. App localizations are located in `locales` directory of this repository. You can review existing localizations or create a new one by copying one of existing localizations and populate it with data.

## Development

See out [Development](/DEVELOPMENT.md) guides for more info.

0 comments on commit f30c78b

Please sign in to comment.