feat: allow conditional skip on success and fail comments#874
Merged
feat: allow conditional skip on success and fail comments#874
Conversation
…when "failCommentCondition" is "false"`
babblebey
commented
Jul 14, 2024
babblebey
commented
Jul 15, 2024
babblebey
commented
Jul 15, 2024
babblebey
commented
Jul 15, 2024
Member
Author
babblebey
left a comment
There was a problem hiding this comment.
Hello @fgreinacher,
Kindly help me clarify these observations... see review comments..
…t comment on existing issues when "failCommentCondition" is disallows it`
babblebey
commented
Jul 16, 2024
…mentCondition" is "false"`
JonasSchubert
suggested changes
Jul 16, 2024
Contributor
JonasSchubert
left a comment
There was a problem hiding this comment.
As @fgreinacher said, awesome you picked that up so quickly, @babblebey , thanks a lot! Just found a small typo in one unit test description, beside that it looks good for me.
Will you also add unit tests for success.js?
Co-authored-by: Jonas Schubert <[email protected]>
Member
Author
…sociatedPR using the "successCommentCondition"`
…R when "successCommentCondition" disables it`
…github.com/semantic-release/github into feat/conditional-success-fail-comment-skip
…R when "successCommentCondition" disables it`
gr2m
reviewed
Jul 19, 2024
Co-authored-by: Gregor Martynus <[email protected]>
…ate in pr and issues fetch
…github.com/semantic-release/github into feat/conditional-success-fail-comment-skip
…github.com/semantic-release/github into feat/conditional-success-fail-comment-skip
…ssues created by "Bots"'`
|
🎉 This issue has been resolved in version 10.3.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR Intend to transfer the flow from semantic-release/gitlab#730 to the github plugin. It introduces the new properties into the configuration option, which are used to perform the stated function.
failCommentCondition- used to state the conditions by which thefailCommentis posted or notsuccessCommentCondition- used to state the conditions by which thesuccessCommentis posted or not and where it is postedChanges Made
failTitle,failCommentandsuccessCommentset asfalseissuesparsed from pull request body and commit messages to aidsuccessCommentConditionfiltering (more datails in feat: allow conditional skip on success and fail comments #874 (comment))buildRelatedIssuesQuery- Builds GraphQL query for fetching PRs/Commits related Issues to a list of commit hash (sha) from parsedIssue numberbuildAssociatedPRsQuery- Builds GraphQL query for fetching associated PRs to a list of commit hash (sha)buildIssuesOrPRsFromResponseNode- Build associatedPRs or RelatedIssues object (into issue-like object withpull_requestproperty) from the GraphQL repository responseRelated Issue
Closes #360
Closes #359
Closes #666
Resolves #529
Screencast/Screenshot
"successCommentCondition": false- Do not add Success comment to any Issue or PRscreencast-bpconcjcammlapcogcnnelfmaeghhagj-2024.3.mp4
"successCommentCondition": "<% return issue.pull_request; %>"- Add Success comment to only Pull Requestsscreencast-bpconcjcammlapcogcnnelfmaeghhagj-2024.4.mp4
"successCommentCondition": "<% return !issue.pull_request; %>"- Add Success comment to only Issuesscreencast-bpconcjcammlapcogcnnelfmaeghhagj-2024.5.mp4