Skip to content

Commit e449f26

Browse files
committed
feature: allow 201 as successful response
1 parent bff7186 commit e449f26

File tree

4 files changed

+88
-23
lines changed

4 files changed

+88
-23
lines changed

dist/index.js

Lines changed: 85 additions & 20 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ const request = require('superagent');
1515

1616
try {
1717
const res = await request.post(url).send(obj);
18-
if (res.status !== 200) {
18+
if (res.status !== 200 || res.status !== 201) {
1919
core.setFailed(`Webhook response code was: ${res.status}`);
2020
}
2121
} catch (error) {

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "fast-webhook",
3-
"version": "1.1.4",
3+
"version": "1.2.0",
44
"description": "A Github Javascript Action that sends a POST request with an optional JSON body to a webhook.",
55
"main": "index.js",
66
"scripts": {

0 commit comments

Comments
 (0)