Skip to content

chore: Fix mistakes

chore: Fix mistakes #4

Workflow file for this run

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."