Commit e097d1c
feat: allow conditional skip on success and fail comments (#874)
* feat: add `failCommentCondition` to `fail` script
* feat: add `successCommentCondition` and `failCommentCondition` to `resolve-config`
* feat: add `successCommentCondition` and `failCommentCondition` to `success` scipt
* fix(build): lint
* test: add `fail` case `Does not post comments if "failCommentCondition" is "false"`
* test: add `fail` case for `Does not post comments on existing issues when "failCommentCondition" is "false"`
* fix(build): lint
* test(fail): add case for `Post new issue if none exists yet, but don't comment on existing issues when "failCommentCondition" is disallows it`
* test(success): add case `Does not comment on issues/PR if "successCommentCondition" is "false"`
* Update test/fail.test.js
Co-authored-by: Jonas Schubert <jonas.schubert.projects@web.de>
* test(success): add case for `Add comment and label to found issues/associatedPR using the "successCommentCondition"`
* nits
* test(success): add case for `Does not comment/label found associatedPR when "successCommentCondition" disables it`
* test(success): improve case `Does not comment/label found associatedPR when "successCommentCondition" disables it`
* doc: add documentation for `successCommentCondition` and `failCommentCondition`
* Update lib/success.js
Co-authored-by: Gregor Martynus <39992+gr2m@users.noreply.github.com>
* refactor: modify `failTitle`, `failComment` and `successComment` false deprecation message
* refator: implement early return in `fail` and `success` lifecyccle helper function
* Update README.md
Co-authored-by: Jonas Schubert <jonas.schubert.projects@web.de>
* remove `failCommentCondition` example wrong description
* build: fix lint
* feat: add validators for `successCommentCondition` and `failCommentCondition`
* feat: add `buildAssociatedPRs` to create pr object in form of issue object with pull_request property
* doc: update README.md
* build: fix lint
* build: fix failing test `Add custom comment and labels`
* feat: request more field for `associatedPRs` via graphql and improve `buildAssociatedPRs` response object with
* test: modify integration tests
* test: modify `success` unit tests
* build: fix lint
* build: fix failing tests
* feat: add `__typename` to `issue.user` object
* test: add new case `Does not comment/label associatedPR created by "Bots"`
* test: modify `pull_request` mock value to `boolean`
* chore(test): clean debug comments
* feat: re-integrate `buildAssociatedPRs`
* feat: re-introduced and modifed `loadSingleCommitAssociatedPRs`
* refactor: introduce `parsedIssues` as returned value from `prs**.body` and `commits**.message`
* feat: added `buildRelatedIssuesQuery` util graphql query builder
* feat: implement computation for `responseRelatedIssues`
* fix: correct `number` arg type in `buildRelatedIssuesQuery`
* refactor: extract common field accross graphql queries to `baseFields`
* refactor: transform `buildAssociatedPRs` to `buildIssuesOrPRsFromResponseNode` with ability to build both `PRs` and `Issues` object
* feat: integrate `buildIssuesOrPRsFromResponseNode`
* feat: implement `issueOrPR` for correctly addressing issues and pr in logs
* feat: implement improved chunk operation helper `inChunks` and integrate in pr and issues fetch
* build: fix lints
* test: update `integrations` test
* test: address PR and Issue naming in logs in `success`
* refactor: why the `Promise.all()`? Removed it haha
* feat: set default `type` param in `buildIssuesOrPRsFromResponseNode`
* feat: address edge cases
* test: fixed matchers in graphql request in `success` units
* build: lint
* docs: add ignore bots pr/issues example
* fix: user issue `number` over `id`
* test: improve case `'Does not comment/label associatedPR and relatedIssues created by "Bots"'`
* doc: modify `buildIssuesOrPRsFromResponseNode` documentation
---------
Co-authored-by: Jonas Schubert <jonas.schubert.projects@web.de>
Co-authored-by: Gregor Martynus <39992+gr2m@users.noreply.github.com>1 parent be071a2 commit e097d1c
File tree
8 files changed
+1873
-202
lines changed- lib
- test
8 files changed
+1873
-202
lines changedLarge diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
26 | | - | |
27 | 26 | | |
| 27 | + | |
| 28 | + | |
28 | 29 | | |
29 | 30 | | |
30 | 31 | | |
31 | 32 | | |
32 | 33 | | |
33 | 34 | | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
34 | 41 | | |
35 | 42 | | |
36 | 43 | | |
| |||
52 | 59 | | |
53 | 60 | | |
54 | 61 | | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
55 | 71 | | |
56 | 72 | | |
57 | 73 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| 11 | + | |
11 | 12 | | |
12 | 13 | | |
| 14 | + | |
13 | 15 | | |
14 | 16 | | |
15 | 17 | | |
| |||
30 | 32 | | |
31 | 33 | | |
32 | 34 | | |
| 35 | + | |
33 | 36 | | |
34 | 37 | | |
35 | 38 | | |
36 | 39 | | |
| 40 | + | |
37 | 41 | | |
38 | 42 | | |
39 | 43 | | |
| |||
0 commit comments