Skip to content

Commit

Permalink
Merge pull request #37 from lldelisle/improve_autoupdate
Browse files Browse the repository at this point in the history
Improve autoupdate round 2
  • Loading branch information
nsoranzo authored Sep 24, 2024
2 parents 5b27d3b + 2c908a6 commit 2d82800
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion .github/workflows/autoupdate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ jobs:
DIFF_BRANCH="origin/$REPO"
else
# Check if a closed PR exists with the same title
if gh_pr_list_out=$(gh pr list --search "is:closed is:unmerged '$TITLE' in:title" | grep -P "^\d+\t[^\t]+\tplanemo-autoupdate:"); then
if gh_pr_list_out=$(gh pr list --search "is:closed is:unmerged '$TITLE' in:title" | grep -P "^\d+\t[^\t]+\tplanemo-autoupdate:" | head -n 1); then
echo "Found a closed PR with title: $TITLE"
OLD_TITLE=$(echo "$gh_pr_list_out" | cut -f 2)
PR_EXISTS=1
Expand Down Expand Up @@ -197,6 +197,10 @@ jobs:
echo "Creating a PR..."
gh pr create --base "${{ matrix.upstream_repo_branch }}" --head "planemo-autoupdate:$REPO" --title "$TITLE" --repo "${{ matrix.upstream_repo_owner}}/${{ matrix.upstream_repo_name }}" --body-file "${{ github.workspace }}/body.txt"
fi
else
echo "No changes compared to $DIFF_BRANCH"
# clean up for the next repo
git checkout -- .
fi
done
if [ ! -z "$errors" ]; then
Expand Down

0 comments on commit 2d82800

Please sign in to comment.