-
Notifications
You must be signed in to change notification settings - Fork 128
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
feat: allow conditional skip on success and fail comments #874
Conversation
…when "failCommentCondition" is "false"`
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hello @fgreinacher,
Kindly help me clarify these observations... see review comments..
…t comment on existing issues when "failCommentCondition" is disallows it`
…mentCondition" is "false"`
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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]>
Yea, working on that 😉 |
…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`
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 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 thefailComment
is posted or notsuccessCommentCondition
- used to state the conditions by which thesuccessComment
is posted or not and where it is postedChanges Made
failTitle
,failComment
andsuccessComment
set asfalse
issues
parsed from pull request body and commit messages to aidsuccessCommentCondition
filtering (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_request
property) 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