-
Notifications
You must be signed in to change notification settings - Fork 129
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
successCommentCondition not able to check PR labels #920
Comments
Yea @shahzebrizvi16 Thanks for reporting this issue, but we sort of deviated from that format to making the label into a simple array with just their names, meaning we've got
...instead of..
and this like didn't exactly make it look like it is in the Pull Request GitHub API response truthfully 😞. I did that So, if you were to have used what was on the documentation example, that would have worked, hence if your config was
Yea, that would've worked! But considering the fact that we had stated in the same documentation example that you should use the Pull Request GitHub API response, so we really are supposed to model exactly after that. So, we will fix that for sure 👍 |
A fix which corrects that API to work exactly has we've resolved as expected has been included in the PR #916 Thanks @shahzebrizvi16 |
Ah so I was not going crazy 😆! But Wow you addressed that very quickly. I think your fix makes sense to keep it consistent otherwise you would have had to separately specify how labels are handled. For the time being your solution made sense so no worries. It's great to see the fix part of the release. |
Hey any updates on this? |
in a bit 😉 |
🎉 This issue has been resolved in version 11.0.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
I am trying to limit the success comments to only PRs which have not been released on a specific channel already. I am doing this by setting the successCommentCondition to check if a PR has the respective "released on @<channel>" label already or not. If it does then success commenting should be skipped.
In a nutshell, I am trying to avoid this on PRs:
I tried doing it the way specified in the README.md file but after testing it I realized that it might be incorrect. This is because within the Pull Request GitHub API response, the "labels" key is an array of objects which is why the loadash method
-.includes
would not work there.So instead I tried to set the successCommentCondition this way using the loadash method
-.some
after locally testing with a sample API response:The snippet above still did not work. My PRs with the label
released on @beta
are still getting commented on if I back-merge the main branch tags to the beta branch.Can I please get some guidance on this, is it my syntax or is this potentially a bug with the plugin?
Thanks!
The text was updated successfully, but these errors were encountered: