Skip to content

Conversation

@vvoland
Copy link
Contributor

@vvoland vvoland commented Feb 9, 2026

Avoid repeatedly opening new PRs for the same CLI version when a previous one was intentionally closed.

Description

Related issues or tickets

Reviews

  • Technical review
  • Editorial review
  • Product review

Avoid repeatedly opening new PRs for the same CLI version when a
previous one was intentionally closed.

Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
@netlify
Copy link

netlify bot commented Feb 9, 2026

Deploy Preview for docsdocker ready!

Name Link
🔨 Latest commit aabd3f9
🔍 Latest deploy log https://app.netlify.com/projects/docsdocker/deploys/6989dab8e4e7990008db9024
😎 Deploy Preview https://deploy-preview-24101--docsdocker.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@github-actions github-actions bot added area/release Relates to CI or deployment ci ci updates labels Feb 9, 2026
Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Documentation Review Summary

Found 2 issues in the workflow documentation that could improve clarity for future maintainers. These relate to comment and message clarity in the new closed PR detection logic.

While the code logic is sound, adding more context to the comments and messages would help future maintainers understand the intentional design decision to prevent reopening previously closed PRs.

git push -u origin "$BRANCH_NAME" --force
gh pr edit "$EXISTING_PR" --title "$PR_TITLE" --body "$PR_BODY"
else
# Check if a closed PR with the same title already exists
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment could be more informative

The comment describes what is being checked but not why it's necessary. Consider clarifying the intent:

Suggested change
# Check if a closed PR with the same title already exists
# Check if a closed PR with the same title already exists (avoid reopening intentionally closed PRs)

This helps future maintainers understand that closed PRs represent an intentional decision, not just a past state.

# Check if a closed PR with the same title already exists
CLOSED_PR=$(gh pr list --state closed --search "$PR_TITLE in:title" --json url --jq ".[0].url // empty")
if [ -n "$CLOSED_PR" ]; then
echo "A closed PR already exists for this version: $CLOSED_PR" >> "$GITHUB_STEP_SUMMARY"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Message could be clearer for workflow debugging

The current message doesn't explicitly state what action is being taken. Consider making it more explicit:

Suggested change
echo "A closed PR already exists for this version: $CLOSED_PR" >> "$GITHUB_STEP_SUMMARY"
echo "Skipping PR creation: closed PR already exists for this version: $CLOSED_PR" >> "$GITHUB_STEP_SUMMARY"

This immediately tells someone viewing the workflow summary what happened and why, improving debugging experience.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/release Relates to CI or deployment ci ci updates

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant