github icon indicating copy to clipboard operation
github copied to clipboard

Feature Request: add comment to issue outside of current repo

Open ScottChapman opened this issue 4 years ago • 4 comments

It looks like mapping PRs -> closed issues is determined by issue-parser. Doing a quick test on that, it is able to parse the slug for the repo containing the issue.

ScottChapman avatar Mar 11 '21 17:03 ScottChapman

I think i have a fix for it if someone wants to take a gander at it.

ScottChapman avatar Mar 12 '21 15:03 ScottChapman

So, the behavior to NOT comment on issues in other repos is intentional (found the test that verifies that behavior). What's the reasoning behind that? Perhaps we can put it behind a flag?

ScottChapman avatar Mar 12 '21 15:03 ScottChapman

I was working on adding a new config fr it (defaulting to current behavior), and I think I found an issue in the tests: https://github.com/semantic-release/github/blob/master/test/success.test.js#L372 I think it SHOULD be adding a comment to that issue since it is in the same repo.

My updated code seems to handle that correctly

Update: I did confirm this is a bug. Issue comments can include the complete URL to the issue, if it is in the same repo visually it will display with just #13, but the actual text in the body is the full URL. So I do think this is a bug with the current implementation.

ScottChapman avatar Mar 12 '21 16:03 ScottChapman

I can implement this as a new feature, preserve the existing behavior as a default. That seem OK?

ScottChapman avatar Mar 14 '21 12:03 ScottChapman