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

@semantic-release/github adds comments to the wrong issues #51

Closed
stalniy opened this issue Jul 2, 2018 · 17 comments
Closed

@semantic-release/github adds comments to the wrong issues #51

stalniy opened this issue Jul 2, 2018 · 17 comments

Comments

@stalniy
Copy link

stalniy commented Jul 2, 2018

It looks like @semantic-release/github adds comments to the wrong issues when used in monorepo

@pmowrer
Copy link
Owner

pmowrer commented Jul 2, 2018

I think you're right! Haven't had a chance to look into it. Here's a few related issues:

semantic-release/github#50
semantic-release/github#63

Help wanted!

@pmowrer
Copy link
Owner

pmowrer commented Jul 2, 2018

As a temporary workaround, the comments can be turned off by overriding the default success and fail plugins (e.g. set them to empty arrays) in the release configuration

@stalniy
Copy link
Author

stalniy commented Jul 15, 2018

I did some investigation and see that github/success function receives context.commits and that array of commits are not filtered by semanatic-release-monorepo.

Will try to understand why is that

@stalniy
Copy link
Author

stalniy commented Jul 15, 2018

semantic-release looking for all commits starting until last release:

  const commits = await getCommits(lastRelease.gitHead, options.branch, logger);

Later it passes this array of commits to every plugin call, in options.commits. That's why github plugin receives the list of all commits, parses them and send comments to wrong issues.

stalniy added a commit to stalniy/casl that referenced this issue Jul 15, 2018
@pmowrer
Copy link
Owner

pmowrer commented Sep 6, 2018

Haven't had a chance to look at this... Thanks for the research!

Sounds like maybe all we need to do is wrap the success plugin like we do the others. The primary reason this library even exists is to allow monkey patching the output of getCommits to filter commits based on package since semantic-release won't allow it.

@milesj
Copy link

milesj commented Nov 7, 2018

Has there been an update on this? It's pretty noise right now every time a release happens.

@cpinnix
Copy link

cpinnix commented Nov 7, 2018

@milesj I don't have an update for you at the moment. But we will be looking into this in the next week or so.

@milesj
Copy link

milesj commented Nov 29, 2018

Our releases are taking longer and longer because it's adding so many comments to PRs. If someone can point me to the location of what to fix, I can take a stab at it. Maybe wrapping the success plugin?

@prisis
Copy link

prisis commented Feb 17, 2019

Is there a way to help you?

GabeDuarteM added a commit to GabeDuarteM/gd-scripts that referenced this issue Mar 29, 2020
Because of the monorepo structure, `semantic-release-monorepo` cannot
determine which pull-requests and issues are supposed to be commented on
each commit. More info on pmowrer/semantic-release-monorepo#51
@pmowrer
Copy link
Owner

pmowrer commented Apr 5, 2020

I have a branch up that should fix this, github-comments-fix, if anyone's willing to give it a try.

@ghost
Copy link

ghost commented Apr 26, 2020

Has anyone tried this? Can we get this fixed in the package?

@stalniy
Copy link
Author

stalniy commented Apr 26, 2020

Just FYI:

I switched to solution semantic-release/semantic-release#193 (comment)

Similar hack but is much simpler and augments only single package. Haven’t tried to enable release comments however. Better cross-release support

@ghost
Copy link

ghost commented Apr 26, 2020

Just FYI:

I switched to solution semantic-release/semantic-release#193 (comment)

Similar hack but is much simpler and augments only single package. Haven’t tried to enable release comments however. Better cross-release support

You should check out semantic-release-plus! Should be essentially the same, but it’s always kept up to date with semantic-release itself.

@travi
Copy link

travi commented Sep 15, 2020

I have a branch up that should fix this, github-comments-fix, if anyone's willing to give it a try.

@pmowrer i've been testing this branch out a fair amount today, and it seems to be working as i would expect. what would it take to include this in a published release (even a pre-release would be ok with me)?

@pmowrer
Copy link
Owner

pmowrer commented Sep 16, 2020

Thanks so much for trying it out @travi! That's good enough for me... just published a new release with the fix!

@pmowrer
Copy link
Owner

pmowrer commented Sep 16, 2020

🎉 This issue has been resolved in version 7.0.3 🎉

The release is available on:

Your semantic-release bot 📦🚀

@travi
Copy link

travi commented Sep 16, 2020

thanks!

panzarino pushed a commit to cypress-io/cypress that referenced this issue Sep 23, 2020
This should allow the posting of comments to work when using the
`github` plugin.

[Fixes pmowrer/semantic-release-monorepo#51]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants