You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+8-3Lines changed: 8 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -16,9 +16,8 @@ Considering you have the following `.github/workflow` file:
16
16
name: CI
17
17
18
18
on:
19
-
push:
20
-
branches:
21
-
- main
19
+
# NOTE: continue-on-error-comment only makes sense to run on a Pull Request
20
+
# see below for more information
22
21
pull_request: {}
23
22
24
23
jobs:
@@ -60,6 +59,12 @@ and then you add a step after that one that uses this action making sure that yo
60
59
61
60
Test-id is used to identify which test failed, so make sure that you pass the relevant `matrix` variables so that you can identify it later.
62
61
62
+
### Pull Request Context
63
+
64
+
`continue-on-error-comment`is designed to be used in the context of a Pull Request. It doesn't make much sense to run this on a commit on a branch.
65
+
66
+
If you do end up adding this action in a non-PR context then it is designed to just do nothing and continue without error. If you find that isn't true please open a bug report with reproduction instructions and we will fix the problem.
console.log(`continue-on-error-comment is designed to be used with pull request and does not work with a [${_actions_github__WEBPACK_IMPORTED_MODULE_1__.context.eventName}] event. We are ignoring this event.`);
constbody=`Some tests with 'continue-on-error: true' have failed:
39
-
40
-
- ${testId}
41
-
42
-
sha: ${context.sha}
43
-
${signiture}`;
44
-
awaitoctokit.rest.issues.createComment({
8
+
if(context.eventName!=='pull_request'){
9
+
console.log(`continue-on-error-comment is designed to be used with pull request and does not work with a [${context.eventName}] event. We are ignoring this event.`);
0 commit comments