Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve autoupdate round 2 #37

Merged
merged 5 commits into from
Sep 24, 2024
Merged
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 current PR"
lldelisle marked this conversation as resolved.
Show resolved Hide resolved
# clean up for the next repo
git checkout -- .
fi
done
if [ ! -z "$errors" ]; then
Expand Down