googleapis / googleapis/release-please

Linking to an issue creates closes token in readme which closes the issue when merged

Open
#2,362 0 comments 0 reactions 1 assignee Claimed by @chingor13 View on GitHub
priority: p3 type: question
Dominant language
TypeScript
Stars
7.5k
Forks
588
Avg merge
12h 16m
Merged PRs (30d)
7

Description

## What you're trying to do

I am trying to understand where in our pipeline this functionality is handled and if it is expected or not.

We [link to issues](https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue#linking-a-pull-request-to-an-issue-using-a-keyword) in github commits. We use the convention of `refs #issue` when the commit references an issue but does not close it. When we do want a linked commit to close we use `fixes #issue` but from the github docs any of the following will perform that action.

- close
- closes
- closed
- fix
- fixes
- fixed
- resolve
- resolves
- resolved

[This commit](https://github.com/agrc/electrofishing-query/commit/212e73ef591aefae02b1eeed6f2e355da6debd3d) used the pattern `Ref 182` and the resulting release pull request added a `, closes #182` which is not accurate.

![image](https://github.com/user-attachments/assets/44596396-66ff-4a17-ac00-81c7689c97d6)

It appears that the code below possibly ignores the value and groups closes and refs together?

https://github.com/googleapis/release-please/blob/34abdd3b7e35bd6638cc5d4c34b8b1ab5bdd29c2/src/commit.ts#L174-L221

This code suggests that closes is presumptuous and it should be refs which aligns with my expectation but is not a part of the node strategy.

https://github.com/googleapis/release-please/blob/34abdd3b7e35bd6638cc5d4c34b8b1ab5bdd29c2/src/strategies/go-yoshi.ts#L180-L197

Is this expected behavior and we need to retrain how we link to issues without closing them or can this be fixed in the strategy or release note writer?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.