Skip to content

Commit

Permalink
Update pr-on-branch-push.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
ines-gimeno-molina authored May 1, 2024
1 parent e15fa7f commit 27aa006
Showing 1 changed file with 1 addition and 13 deletions.
14 changes: 1 addition & 13 deletions .github/workflows/pr-on-branch-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ on:

jobs:
create-pull-request:
if: $(git rev-parse "${{ github.sha }}")!=$(git rev-parse "refs/heads/dev")
runs-on: ubuntu-latest
permissions:
issues: read
Expand All @@ -19,19 +20,6 @@ jobs:
fetch-depth: 0
ref: dev

- name: Check for branch changes
id: check_branch_changes
run: |
NEW_BRANCH_SHA=$(git rev-parse "${{ github.sha }}")
echo "This is the new branch sha: $NEW_BRANCH_SHA"
DEV_BRANCH_SHA=$(git rev-parse "refs/heads/dev")
echo "This is the new branch sha: $DEV_BRANCH_SHA"
if [[ "${NEW_BRANCH_SHA}" == "${DEV_BRANCH_SHA}" ]]; then
echo "No new commits in the branch. Exiting workflow."
exit 0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Create PR
run: |
echo "Get the list of PR for that branch that are open"
Expand Down

0 comments on commit 27aa006

Please sign in to comment.