chore: Fix mistakes #4
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
name: Open Pull Request on Develop | |
on: | |
push: | |
branches: | |
- feature/* | |
jobs: | |
open_pull_request: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check if PR exists | |
id: check_pr | |
run: | | |
PR_EXIST=$(gh pr list --state open --base develop --head "$(echo "${GITHUB_REF}" | sed -E 's/refs\/heads\/feature\/(.*)/\1/')") | |
if [[ -z $PR_EXIST ]]; then | |
echo "::set-output name=pr_exists::false" | |
else | |
echo "::set-output name=pr_exists::true" | |
fi | |
env: | |
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Create PR | |
if: steps.check_pr.outputs.pr_exists == 'false' | |
uses: peter-evans/create-pull-request@v3 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
branch: develop | |
title: "Merge feature branch" | |
body: "This pull request merges the changes from the feature branch into develop." |