Skip to content

Release PR closing-keyword rewrite misses release-please's markdown-link form #2320

Description

@ScriptedAlchemy

scripts/neutralize-release-pr-closing-keywords.py (added in 5ad8106) does not match the form release-please actually writes into release PR bodies: a closing keyword followed by a markdown-linked reference, e.g.

..., closes [#2231](https://github.com/ScriptedAlchemy/tracedecay/issues/2231)

The regex requires the reference to start immediately after the keyword (#\d+, owner/repo#\d+, or a bare issues URL), so the [ defeats it.

Reproduction (on master at 2a1598f):

$ printf 'closes [#2231](https://github.com/ScriptedAlchemy/tracedecay/issues/2231)\n' | python3 scripts/neutralize-release-pr-closing-keywords.py
closes [#2231](https://github.com/ScriptedAlchemy/tracedecay/issues/2231)

Evidence: the #2306 (1.0.0-beta.57) body still had closes [#2231](...) and closes [#2308](...) after running scripts/neutralize-release-pr-closing-keywords.sh against it (exit 0, no edit). Both lines were rewritten to Refs [#N](...) by hand before merging. Both issues were already closed, so nothing was wrongly closed this time.

scripts/test-neutralize-release-pr-closing-keywords.py exercises only bare #N / owner/repo#N / URL forms, so it passes; the release-please markdown-link form should be added to it as a literal case.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions