Giter VIP home page Giter VIP logo

skyhook's Introduction

skyhook

Parses webhooks and forwards them in the proper format to Discord.

Discord

Setup

You can use the site to create the right webhook link. If you want to manually do it, here are the steps:

  1. Create a webhook in Discord (Server Settings -> Webhooks -> Create Webhook)
  2. Copy the webhook url
  3. Turn the Discord webhook url into a skyhook webhook url like so:
Replace discord.com in url with skyhookapi.com
https://discord.com/api/webhooks/firstPartOfWebhook/secondPartOfWebhook
->
https://skyhookapi.com/api/webhooks/firstPartOfWebhook/secondPartOfWebhook
  1. Add the provider you want to the end of the url:
https://skyhookapi.com/api/webhooks/firstPartOfWebhook/secondPartOfWebhook/providerGoesHere

Supported Providers

If you want support for a new provider, just create a pull request and add it!
Alternatively, a new provider can also be requested by creating an issue.

Contributing

If you wish to contribute, follow our contributing guide.

Creating a Provider

If you want to create a new provider please follow the examples shown at our small documentation.

Testing Locally

To build:

npm run build

To run server (after building):

npm start

To do both:

npm run buildstart

To run tests:

npm test

Through Docker:

docker run -it --rm -p 8080:8080 commit451/skyhook

Web

If you are looking for the frontend web version of skyhook which lets you generate a properly formatted URL, it lives here. This repo/project just includes the backend service.

Deploying

Thanks

Special thanks to all our amazing contributors. skyhookapi.com is hosted for free for you, so if you feel so inclined, buy a coffee!

License

skyhook is available under the MIT license. See the LICENSE file for more info.

\ ゜o゜)ノ

skyhook's People

Contributors

akizo96 avatar alexwh avatar baconcheese113 avatar beingbrown avatar betterb0y avatar blowaxd avatar dahlgren avatar dependabot[bot] avatar dscalzi avatar favna avatar felipepaiva1992 avatar jameds avatar jawnnypoo avatar justalemon avatar kobkrit avatar logerfo avatar lugghawk avatar mands avatar miralita avatar munsio avatar nbyavuz avatar neuxz avatar sg004 avatar skmedix avatar thephd avatar tiagodanin avatar wh1337 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

skyhook's Issues

No length guards

It appears that none of the embeds have any length guards against exceeding the maximum size of Discords Embeds / messages.

Limits are...

  • 25 Fields
    • Name: 256
    • Value: 1024
  • Description: 2048
  • Total Length: 4000

I believe i accidentally exceed the description limit with a merge...

Bitbucket body not defined

[Thu, 26 Oct 2017 20:39:32 GMT] Calling pullrequestCreated() in BitBucket provider.
3:39 PM
Error during parse: ReferenceError: body is not defined
3:39 PM
at BitBucket.pullrequestCreated (/app/providers/bitbucket.js:284:26)
3:39 PM
at BitBucket.parse (/app/util/BaseProvider.js:21:29)
3:39 PM
at
3:39 PM
at process._tickCallback (internal/process/next_tick.js:169:7)

[Proposal] Bitbucket Provider

Hello, I have a proposal for this service. Many people use Bitbucket as a git hosting solution and currently there exists no public way to connect Bitbucket webhooks to discord. I would find it amazingly useful if a bitbucket provider could be added to this service. Many others may find this useful aswell.

I would take on the burden of this task myself, however I'm not a Javascript programmer. Also, I am not entirely sure how I would go about testing a bitbucket provider. I would definately be willing to assist someone in creating this, however I don't think I have enough knowledge to do this entirely myself.

Information on Bitbucket's webhook payloads can be found on https://confluence.atlassian.com/bitbucket/manage-webhooks-735643732.html

copyToClipboard is not a function

I put my discord-link https://ptb.discordapp.com/api/webhooks/3245... to input, select BitBucket and click on Generate, but nothing happens with this error:
image

Include additional data in webhooks for circleci

It would be really nice if the circleci webhook would parse additional data such as

  • commit message
  • commit hash (which links to https://github.com/<user>/<repo>/<commit_hash>)
  • commit author

dummy code:

{
  "embed": {
    "title": "Build #<BuildNumber>",
    "description": "[<CommitHash>](https://github.com/<user>/<repo>/<commit_hash>): <CommitMessage> - <CommitAuthor>\n**Outcome**: <result>",
    "url": "<URL_To_Build>",
    "color": 0,
    "footer": {
      "text": "Powered by Skyhook"
    },
    "author": {
      "name": "<RepoName>:<BranchName>",
      "icon_url": "https://github.com/<CommitAuthor>.png"
    }
  }
}

Filled in example:

{
  "embed": {
    "title": "Build #28",
    "description": "[208b620](https://github.com/Favna/Ribbon/commit/208b620edf8be81c78c211347694a5aaf43743f1): another circleci attempt - Favna\n**Outcome**: success",
    "url": "https://circleci.com/gh/Favna/Ribbon/28",
    "color": 0,
    "footer": {
      "text": "Powered by Skyhook"
    },
    "author": {
      "name": "Ribbon:master",
      "icon_url": "https://github.com/favna.png"
    }
  }
}

Atlassian support

Hi,

it would be great if you could build support for all the other Atlassian products like Bamboo and Jira.

Best regards

Request timeout on Bitbucket

Hello,

Thank you for the amazing (and free) tool! However, whenever there is an issue:comment_created event in BitBucket, the request times out after cca. 10 seconds. Below you will find a ss from BitBucket and also the request body.
The issue only seems to present itself on issue:* events and not on repo:* events.

Thank you!

Andrei I. Hava

capture

{
  "comment": {
    "links": {
      "self": {
        "href": "https://api.bitbucket.org/2.0/repositories/satellite27studios/adventures-of-keepe/issues/2/comments/38573950"
      },
      "html": {
        "href": "https://bitbucket.org/satellite27studios/adventures-of-keepe/issues/2#comment-38573950"
      }
    },
    "content": {
      "raw": "Please provide a detailed description when creating an issue.",
      "markup": "markdown",
      "html": "<p>Please provide a detailed description when creating an issue.</p>"
    },
    "created_on": "2017-07-26T17:26:32.433306+00:00",
    "user": {
      "username": "AndreiiiH",
      "type": "user",
      "display_name": "Andrei I. Hava",
      "uuid": "{6655224d-6bda-43ae-a012-20db50b5ad0f}",
      "links": {
        "self": {
          "href": "https://api.bitbucket.org/2.0/users/AndreiiiH"
        },
        "html": {
          "href": "https://bitbucket.org/AndreiiiH/"
        },
        "avatar": {
          "href": "https://bitbucket.org/account/AndreiiiH/avatar/32/"
        }
      }
    },
    "updated_on": null,
    "type": "issue_comment",
    "id": 38573950
  },
  "issue": {
    "content": {
      "raw": "",
      "markup": "markdown",
      "html": ""
    },
    "kind": "task",
    "links": {
      "attachments": {
        "href": "https://api.bitbucket.org/2.0/repositories/satellite27studios/adventures-of-keepe/issues/2/attachments"
      },
      "self": {
        "href": "https://api.bitbucket.org/2.0/repositories/satellite27studios/adventures-of-keepe/issues/2"
      },
      "watch": {
        "href": "https://api.bitbucket.org/2.0/repositories/satellite27studios/adventures-of-keepe/issues/2/watch"
      },
      "comments": {
        "href": "https://api.bitbucket.org/2.0/repositories/satellite27studios/adventures-of-keepe/issues/2/comments"
      },
      "html": {
        "href": "https://bitbucket.org/satellite27studios/adventures-of-keepe/issues/2/basic-movement"
      },
      "vote": {
        "href": "https://api.bitbucket.org/2.0/repositories/satellite27studios/adventures-of-keepe/issues/2/vote"
      }
    },
    "reporter": {
      "username": "s_martinez",
      "type": "user",
      "display_name": "Sebastian Martinez",
      "uuid": "{1bdd71db-b976-4e78-82b4-ae805ee6f68a}",
      "links": {
        "self": {
          "href": "https://api.bitbucket.org/2.0/users/s_martinez"
        },
        "html": {
          "href": "https://bitbucket.org/s_martinez/"
        },
        "avatar": {
          "href": "https://bitbucket.org/account/s_martinez/avatar/32/"
        }
      }
    },
    "title": "Basic Movement",
    "component": {
      "name": "Core Mechanics",
      "links": {
        "self": {
          "href": "https://api.bitbucket.org/2.0/repositories/satellite27studios/adventures-of-keepe/components/413087"
        }
      }
    },
    "votes": 0,
    "watches": 1,
    "priority": "major",
    "assignee": {
      "username": "s_martinez",
      "type": "user",
      "display_name": "Sebastian Martinez",
      "uuid": "{1bdd71db-b976-4e78-82b4-ae805ee6f68a}",
      "links": {
        "self": {
          "href": "https://api.bitbucket.org/2.0/users/s_martinez"
        },
        "html": {
          "href": "https://bitbucket.org/s_martinez/"
        },
        "avatar": {
          "href": "https://bitbucket.org/account/s_martinez/avatar/32/"
        }
      }
    },
    "state": "new",
    "version": null,
    "edited_on": null,
    "created_on": "2017-07-22T15:05:19.412188+00:00",
    "milestone": {
      "name": "FY2017Q4",
      "links": {
        "self": {
          "href": "https://api.bitbucket.org/2.0/repositories/satellite27studios/adventures-of-keepe/milestones/275139"
        }
      }
    },
    "updated_on": "2017-07-26T17:26:32.445790+00:00",
    "type": "issue",
    "id": 2
  },
  "actor": {
    "username": "AndreiiiH",
    "type": "user",
    "display_name": "Andrei I. Hava",
    "uuid": "{6655224d-6bda-43ae-a012-20db50b5ad0f}",
    "links": {
      "self": {
        "href": "https://api.bitbucket.org/2.0/users/AndreiiiH"
      },
      "html": {
        "href": "https://bitbucket.org/AndreiiiH/"
      },
      "avatar": {
        "href": "https://bitbucket.org/account/AndreiiiH/avatar/32/"
      }
    }
  },
  "repository": {
    "scm": "git",
    "website": "",
    "name": "Adventures of Keepe",
    "links": {
      "self": {
        "href": "https://api.bitbucket.org/2.0/repositories/satellite27studios/adventures-of-keepe"
      },
      "html": {
        "href": "https://bitbucket.org/satellite27studios/adventures-of-keepe"
      },
      "avatar": {
        "href": "https://bitbucket.org/satellite27studios/adventures-of-keepe/avatar/32/"
      }
    },
    "project": {
      "links": {
        "self": {
          "href": "https://api.bitbucket.org/2.0/teams/satellite27studios/projects/AK"
        },
        "html": {
          "href": "https://bitbucket.org/account/user/satellite27studios/projects/AK"
        },
        "avatar": {
          "href": "https://bitbucket.org/account/user/satellite27studios/projects/AK/avatar/32"
        }
      },
      "type": "project",
      "uuid": "{c96fe6aa-3438-42e5-b1f6-31724711fc05}",
      "key": "AK",
      "name": "Adventures of Keepe"
    },
    "full_name": "satellite27studios/adventures-of-keepe",
    "owner": {
      "username": "satellite27studios",
      "type": "team",
      "display_name": "Satellite 27",
      "uuid": "{84bee304-f90a-4558-b099-cc7887c41922}",
      "links": {
        "self": {
          "href": "https://api.bitbucket.org/2.0/teams/satellite27studios"
        },
        "html": {
          "href": "https://bitbucket.org/satellite27studios/"
        },
        "avatar": {
          "href": "https://bitbucket.org/account/satellite27studios/avatar/32/"
        }
      }
    },
    "type": "repository",
    "is_private": true,
    "uuid": "{c56823bd-c964-47f0-9a7d-bb92d22de437}"
  }
}

Bitbucket Commit Limit

Looks like there is a limit of 5 commits for Bitbucket due to Discord message limits (see #23). For those of us who tend to batch things up locally before a push, this can lose a lot of activity.

If the messages are now shortened to 256 characters by Skyhook, and we have 4,000 to work with in Discord, even assuming other message data, the 5 limit seems a little short.

That said, might I suggest that instead of a commit limit, the total message size is tracked and truncated as needed?

Additionally, in the case where commits need to be left off, a short message along the lines of "Additional X commits not displayed." would be useful.

Unity share_url not defined

[Thu, 26 Oct 2017 20:39:22 GMT] Calling parseData() in Unity provider.
3:39 PM
Error during parse: TypeError: Cannot read property 'share_url' of undefined
3:39 PM
at Unity.parseData (/app/providers/unity.js:17:38)
3:39 PM
at Unity.parse (/app/util/BaseProvider.js:21:29)
3:39 PM
at /app/server.js:82:45
3:39 PM
at Layer.handle [as handle_request] (/app/node_modules/express/lib/router/layer.js:95:5)
3:39 PM
at next (/app/node_modules/express/lib/router/route.js:137:13)
3:39 PM
at Route.dispatch (/app/node_modules/express/lib/router/route.js:112:3)
3:39 PM
at Layer.handle [as handle_request] (/app/node_modules/express/lib/router/layer.js:95:5)
3:39 PM
at /app/node_modules/express/lib/router/index.js:281:22
3:39 PM
at param (/app/node_modules/express/lib/router/index.js:354:14)
3:39 PM
at param (/app/node_modules/express/lib/router/index.js:365:14)

CirleCI has seemingly stopped working for non-PRs

This is going to be an odd one. My CirleCI is set up just fine in terms of building both master and PRs and all the builds in recent time have been succeeding as you can see here, however ever since build number #278 it has stopped sending webhook notifications for anything but PRs as can be seen in this screenshot:

I am currently at my 325th build on CircleCI and the last notifications I got was the PR that is build 319. I haven't changed anything in my CirleCI config.yml (diffchecker of config.yml at 278 (left) vs current (right)) nor build settings in that time so actually have no idea what the cause could be. lastly to check the full Git Compare of the latest working build vs the current master click here

Admittedly I have not yet tested this with a self-hosted version of skyhook, that is because I first wanted to reach out before going through the setup for self hosting.

Uncaught TypeError: window.copyToClipboard is not a function

Unable to generate webhooks via the Skyhook website.

From the looks of the error message in the Developers Console on Chrome it is unable to pull a script for copying the webhook to the clipboard.

skyhook.glitch.me/:196 GET https://wzrd.in/standalone/copy-to-clipboard@latest net::ERR_INSECURE_RESPONSE
client.js:41 Uncaught TypeError: window.copyToClipboard is not a function
    at HTMLButtonElement.<anonymous> (client.js:41)
    at HTMLButtonElement.dispatch (jquery-2.2.1.min.js:3)
    at HTMLButtonElement.r.handle (jquery-2.2.1.min.js:3)
(anonymous) @ client.js:41
dispatch @ jquery-2.2.1.min.js:3
r.handle @ jquery-2.2.1.min.js:3

Not triggering on commits

I set your script up on my server to relay GitLab commit messages to Discord, and clicking the Test button triggers it, and so does editing wiki pages (though they aren't formatted as nicely) - but nothing happens on commits.

I'm using GitLab 9.0.5 by the way.

(oh, and Discord gives me https://canary.discordapp.com/api/webhooks/ urls - but just removing the canary part makes them work with your script, so it's not really an issue)

Issue when someone push changes to Bitbucket.

An error has occured on skyhook for your webhook with provider bitbucket. Maybe you can screenshot this error and open an issue on the skyhook GitHub. Error: "TypeError: Cannot read property 'length' of undefined\n at BitBucket.<anonymous> (/app/dist/providers/Bitbucket.js:60:46)\n at Generator.next (<anonymous>)\n at /app/dist/providers/Bitbucket.js:6:71\n at new Promise (<anonymous>)\n at __awaiter (/app/dist/providers/Bitbucket.js:2:12)\n at BitBucket.repoPush (/app/dist/providers/Bitbucket.js:48:16)\n at BitBucket.<anonymous> (/app/dist/model/BaseProvider.js:56:33)\n at Generator.next (<anonymous>)\n at fulfilled (/app/dist/model/BaseProvider.js:3:58)\n at process._tickCallback (internal/process/next_tick.js:68:7)"

An error has occured on skyhook for your webhook with provider bitbucket. Maybe you can screenshot this error and open an issue on the skyhook GitHub. Error: "TypeError: Cannot read property 'length' of undefined\n at BitBucket.<anonymous> (/app/dist/providers/Bitbucket.js:60:46)\n at Generator.next (<anonymous>)\n at /app/dist/providers/Bitbucket.js:6:71\n at new Promise (<anonymous>)\n at __awaiter (/app/dist/providers/Bitbucket.js:2:12)\n at BitBucket.repoPush (/app/dist/providers/Bitbucket.js:48:16)\n at BitBucket.<anonymous> (/app/dist/model/BaseProvider.js:56:33)\n at Generator.next (<anonymous>)\n at fulfilled (/app/dist/model/BaseProvider.js:3:58)\n at process._tickCallback (internal/process/next_tick.js:68:7)" NEW MESSAGES

BitBucketBOTToday at 11:23 AM An error has occured on skyhook for your webhook with provider bitbucket. Maybe you can screenshot this error and open an issue on the skyhook GitHub. Error: "TypeError: Cannot read property 'length' of undefined\n at BitBucket.<anonymous> (/app/dist/providers/Bitbucket.js:60:46)\n at Generator.next (<anonymous>)\n at /app/dist/providers/Bitbucket.js:6:71\n at new Promise (<anonymous>)\n at __awaiter (/app/dist/providers/Bitbucket.js:2:12)\n at BitBucket.repoPush (/app/dist/providers/Bitbucket.js:48:16)\n at BitBucket.<anonymous> (/app/dist/model/BaseProvider.js:56:33)\n at Generator.next (<anonymous>)\n at fulfilled (/app/dist/model/BaseProvider.js:3:58)\n at process._tickCallback (internal/process/next_tick.js:68:7)"

screen

https://skyhook.glitch.me/ timeout

Hi. Bitbucket is reporting timeouts when they are pushing commits over your gateway. Is everything ok? Should I install my own gateway instead? Thank you.

Codacy Support?

Hi there,

I would find it really useful if we had Codacy support (which has support for webhooks).

Payload:

{
   "commit": {
      "data": {
         "uuid": "<uuid>",
         "urls": {         
            "delta": "https://www.codacy.com/public/<user>/<repo>.git/commit?bid=<bid>&cid=<cid>"
         }
      },
      "results": {
         "fixed_count": 1,
         "new_count": 0
      }
   }
}

commit.data.urls.delta should be the link used for the url on the embed.
Two fields used on the embed should be Fixed Issues and New Issues, which use the values commit.results.fixed_count and commit.results.new_count respectively.

Thanks,

Lewis

Trello integration does not handle inter-board card movement correctly

When a card is moved from one list to another in the same board Skyhook sends two messages with blank descriptions in its embed.

Example:
After creating a card, moving it to another board, moving it back to the original board, and then moving the card from one list to another list on the same board you end up with 2 empty messages for the move between lists.
image

Unity error

[Fri, 27 Oct 2017 01:30:58 GMT] Calling parseData() in Unity provider.
8:30 PM
Error during parse: TypeError: Cannot read property 'href' of undefined
8:30 PM
at Unity.parseData (/app/providers/unity.js:33:37)
8:30 PM
at Unity.parse (/app/util/BaseProvider.js:27:29)
8:30 PM
at /app/server.js:82:45
8:30 PM
at Layer.handle [as handle_request] (/app/node_modules/express/lib/router/layer.js:95:5)
8:30 PM
at next (/app/node_modules/express/lib/router/route.js:137:13)
8:30 PM
at Route.dispatch (/app/node_modules/express/lib/router/route.js:112:3)
8:30 PM
at Layer.handle [as handle_request] (/app/node_modules/express/lib/router/layer.js:95:5)
8:30 PM
at /app/node_modules/express/lib/router/index.js:281:22
8:30 PM
at param (/app/node_modules/express/lib/router/index.js:354:14)
8:30 PM
at param (/app/node_modules/express/lib/router/index.js:365:14)

Trello "Moved Card" Emote not working

The emote for moving a card to a different list is not displaying (tested on MacOS and Android).
Example: screen shot 2017-12-06 at 20 43 03

I think replacing it with a should fix it.

Code in question:

embed.description = '`' + this.action.data.listBefore.name + '` \uD83E\uDC6A `' + this.action.data.listAfter.name + '`'

Support for Kanbanflow Webhooks

Support for Kanbanflow Webhooks

Documentation unfortunately is only available if you create a trial account.
Here are screens.

image

image

image
`

Property Type Comment
name String Optional.
callbackUrl String Required. Must return status code 200 on a HTTP HEAD request. Only supports http(s):// protocols.
events Array Required. Valid event names: taskCreated, taskChanged, taskDeleted, taskCommentCreated, taskCommentChanged, taskCommentDeleted. At least one must be given.Example: [{ "name": "taskCreated" }, { "name": "taskChanged" }, { "name": "taskCommentCreated" }]
filter Object Optional. Filter on a specific column, swimlane and/or changes to certain properties.Examples: { "columnId": "ff31c6b2374911e49d115f7064763810" }, { "swimlaneId": "e037a6400e8911e5bdc9053860f3e5c0" }, { "changedProperties": ["color", "totalSecondsSpent"] }

`

`

Property Type Comment
name String  
callbackUrl String Must return status code 200 on a HTTP HEAD request. Only supports http(s):// protocols.
events Array Valid event names: taskCreated, taskChanged, taskDeleted, taskCommentCreated, taskCommentChanged, taskCommentDeleted. At least one must be given.Example: [{ "name": "taskCreated" }, { "name": "taskChanged" }, { "name": "taskCommentCreated" }]
filter Object Filter on a specific column, swimlane and/or changes to certain properties.Examples: { "columnId": "ff31c6b2374911e49d115f7064763810" }, { "swimlaneId": "e037a6400e8911e5bdc9053860f3e5c0" }, { "changedProperties": ["color", "totalSecondsSpent"] }

`

`Delete webhook
Description

Delete an existing webhook.
Request format

curl -X POST https://kanbanflow.com/api/v1/webhooks/<WEBHOOK_ID>

Example request

curl -X POST https://kanbanflow.com/api/v1/webhooks/ca9126bbd12e2ebe57048f841401b14b`
`Events

Each event will deliver specific details relevant to the event type.
Task created example

{
"eventType": "taskCreated",
"userId": "ec1b92fb1868c44aa9a041583c000e2a",
"userFullName": "John Doe",
"timestamp": "2015-10-20T14:45:06.331Z",
"task": {
"_id": "60e8b629fc8d6d28b513807d7d86b133",
"name": "Write report",
"description": "For school",
"color": "green",
"columnId": "ff31c6b2374911e49d115f7064763810",
"totalSecondsSpent": 0,
"totalSecondsEstimate": 0,
"swimlaneId": "e037a6400e8911e5bdc9053860f3e5c0",
"dates": [
{
"targetColumnId": "ff31c6b4374911e49d115f7064763810",
"status": "active",
"dateType": "dueDate",
"dueTimestamp": "2015-10-20T15:00:00Z",
"dueTimestampLocal": "2015-10-20T17:00:00+02:00"
}
],
"subTasks": [
{
"name": "Proofread",
"finished": false
}
],
"labels": [
{
"name": "Writing",
"pinned": false
}
]
}
}

Task changed example

{
"eventType": "taskChanged",
"userId": "ec1b92fb1868c44aa9a041583c000e2a",
"userFullName": "John Doe",
"timestamp": "2015-10-20T14:45:13.775Z",
"task": {
"_id": "60e8b629fc8d6d28b513807d7d86b133",
"name": "Write report",
"description": "For school",
"color": "blue",
"columnId": "ff31c6b2374911e49d115f7064763810",
"totalSecondsSpent": 0,
"totalSecondsEstimate": 0,
"swimlaneId": "e037a6400e8911e5bdc9053860f3e5c0",
"dates": [
{
"targetColumnId": "ff31c6b4374911e49d115f7064763810",
"status": "active",
"dateType": "dueDate",
"dueTimestamp": "2015-10-20T15:00:00Z",
"dueTimestampLocal": "2015-10-20T17:00:00+02:00"
}
],
"subTasks": [
{
"name": "Proofread",
"finished": false
}
],
"labels": [
{
"name": "Writing",
"pinned": false
}
]
},
"changedProperties": [
{
"property": "color",
"oldValue": "red",
"newValue": "blue"
}
]
}

Task deleted example

{
"eventType": "taskDeleted",
"userId": "ec1b92fb1868c44aa9a041583c000e2a",
"userFullName": "John Doe",
"timestamp": "2015-10-20T14:45:26.138Z",
"taskId": "60e8b629fc8d6d28b513807d7d86b133",
"taskName": "Write report"
}

Comment created example

{
"eventType": "taskCommentCreated",
"userId": "ec1b92fb1868c44aa9a041583c000e2a",
"userFullName": "John Doe",
"timestamp": "2015-10-20T14:45:26.138Z",
"taskId": "60e8b629fc8d6d28b513807d7d86b133",
"taskName": "Write report",
"taskComment": {
"_id": "6620beec99fb037e13cf21cf03019914",
"text": "Finished writing report.",
"authorUserId": "ec1b92fb1868c44aa9a041583c000e2a",
"createdTimestamp": "2015-10-20T14:45:26"
}
}

Comment changed example

{
"eventType": "taskCommentChanged",
"userId": "ec1b92fb1868c44aa9a041583c000e2a",
"userFullName": "John Doe",
"timestamp": "2015-10-21T14:45:26.138Z",
"taskId": "60e8b629fc8d6d28b513807d7d86b133",
"taskName": "Write report",
"taskComment": {
"_id": "6620beec99fb037e13cf21cf03019914",
"text": "Finished writing report.",
"authorUserId": "ec1b92fb1868c44aa9a041583c000e2a",
"createdTimestamp": "2015-10-20T14:45:26",
"updatedTimestamp": "2015-10-21T14:45:26"
},
"oldTaskCommentText": "Finished writing report.",
"newTaskCommentText": "Almost finished writing report."
}

Comment deleted example

{
"eventType": "taskCommentDeleted",
"userId": "ec1b92fb1868c44aa9a041583c000e2a",
"userFullName": "John Doe",
"timestamp": "2015-10-20T14:45:26.138Z",
"taskId": "60e8b629fc8d6d28b513807d7d86b133",
"taskName": "Write report",
"taskCommentId": "6620beec99fb037e13cf21cf03019914",
"taskCommentText": "Finished writing report."
}`

`Signature verification

Each webhook has an associated secret you can use to verify that the request came from KanbanFlow. The request made to your URL endpoint will contain a special header called X-KanbanFlow-Signature. The signature is a HMAC-SHA256 hex digest of the payload using the secret as the key. Exactly how to verify the signature depends on your platform. Using Node.js for example, the signature can be verified as follows:

var crypto = require('crypto');

function verifyKanbanFlowWebhookRequest(request, secret) {
var content = request.body;
var digest = crypto.createHmac('sha256', secret).update(content).digest('hex');
var signature = request.headers['x-kanbanflow-signature'];
return digest === signature;
}`

Patreon hooks doesn't work

Patreon make changes in API and allow send all event types on one webhook. So, in test I get error:

Test Response
---
Error: HTTPSConnectionPool(host='skyhook.glitch.me', port=443): Read timed out. (read timeout=10)

Update material-components

We are on 0.8.0 and they are on 0.23.0. A simple version change breaks a lot of things, so it would be an involved migration probably.

BitBucket anonymous user error

If an issue is created by an anonymous user this error is printed multiple times.

Error: "TypeError: Cannot read property 'avatar' of undefined\n at BitBucket.extractAuthor (/app/dist/provider/Bitbucket.js:300:48)\n at BitBucket. (/app/dist/provider/Bitbucket.js:135:38)\n at Generator.next ()\n at /app/dist/provider/Bitbucket.js:6:71\n at new Promise ()\n at __awaiter (/app/dist/provider/Bitbucket.js:2:12)\n at BitBucket.issueCreated (/app/dist/provider/Bitbucket.js:134:16)\n at BitBucket. (/app/dist/provider/BaseProvider.js:57:33)\n at Generator.next ()\n at fulfilled (/app/dist/provider/BaseProvider.js:3:58)"

Doing GET request on webhhok

I am trying to add a webhook to Trello, but when I do, I get the error URL (https://skyhook.glitch.me/api/webhooks/476133366023061514/fcFcMYuT_W0AlGF8aTJBddYQWxxxxxxxxxxxxxxxxxxxxxxxxxGg-jhKJb/trello) did not return 200 status code, got 400

Could doing GET requests return a status code of 200? Or am I doing something wrong?

GitBucket Support

Discord changes to their API has invalidated the way GitBucket sends API requests. However, Discord seems to be unwilling to change to make it compatible, and GitBuckets developers think there is nothing wrong with their API.

Gitbucket provides their webhooks like this.
https://github.com/gitbucket/gitbucket/wiki/API-WebHook

It would be awesome if support could be given through this application, to at least help us easy up our project woes.

Jenkins CI Support

I use Jenkins extensively for compiling my public PaperMC/Spigot plugins.

I'd like to have messages forwarded to my Discord so plugin users can see when a new release or patch is out.

Although I don't believe that Jenkins has built in functionality there is a plugin meant for the job:
https://wiki.jenkins-ci.org/display/JENKINS/Notification+Plugin

The plugin page shows the format of the data.
The IRC bot for example uses the following message format:

Project SomeProject build #123: SUCCESS in 2 min 10 sec: https://ci.example.com/job/AProject/123/

Where SUCCESS can be any of the results.

Gitlab: Branch Name Cut Off

If the branch name is something like Features/SomeFeature, the branch is only "Features".

Possible solution: Skip the first 1/2 elements of the array then rejoin everything using / again here

UnsupportedMediaTypeError

This keeps popping up in the logs

error: UnsupportedMediaTypeError: unsupported content encoding "utf-8"
2:21 AM
    at contentstream (/app/node_modules/body-parser/lib/read.js:170:13)
2:21 AM
    at read (/app/node_modules/body-parser/lib/read.js:54:14)
2:21 AM
    at jsonParser (/app/node_modules/body-parser/lib/types/json.js:127:5)
2:21 AM
    at Layer.handle [as handle_request] (/app/node_modules/express/lib/router/layer.js:95:5)
2:21 AM
    at trim_prefix (/app/node_modules/express/lib/router/index.js:317:13)
2:21 AM
    at /app/node_modules/express/lib/router/index.js:284:7
2:21 AM
    at Function.process_params (/app/node_modules/express/lib/router/index.js:335:12)
2:21 AM
    at next (/app/node_modules/express/lib/router/index.js:275:10)
2:21 AM
    at expressInit (/app/node_modules/express/lib/middleware/init.js:40:5)
2:21 AM
    at Layer.handle [as handle_request] (/app/node_modules/express/lib/router/layer.js:95:5)

Unity Webhook not working

Hi, in a recent few days I'm not able to receive Unity Webhook anymore
screen shot 2018-07-27 at 10 16 05
After checking the json message sent by Unity, I realize that they've change the download URL to the "artifact" part, here's the message I received

{
  'buildNumber': 101,
	'buildStatus': 'success',
	'buildTargetName': 'Default Android',
	'lastBuiltRevision': '******',
	'links':
		{
			'api_self':
				{
					'href': '****/builds/101',
					'method': 'get'
				},
			'artifacts': [
				{
					'files': [{
						'filename': 'Default Android.apk',
						// here's the new download URL, I guess
						'href': 'https://unitycloud-build-user-svc-live-build.s3.amazonaws.com/*****',
						'resumable': false,
						'size': 43174425
					}],
					'key': 'primary',
					'name': '.APK file',
					'primary': true,
					'show_download': true
				}],
			'dashboard_download': {
				'href': '****',
				'method': 'get'
			},
			'dashboard_download_direct': {
				'href': '****',
				'method': 'get'
			},
			'dashboard_log': {
				'href': '****/builds/101/log',
				'method': 'get'
			},
			'dashboard_project': {'href': '****', 'method': 'get'},
			'dashboard_summary': {
				'href': '****/buildtargets/default-android/builds/101/summary',
				'method': 'get'
			},
			'dashboard_url': {'href': 'https://developer.cloud.unity3d.com', 'method': 'get'}
		},
	'local': false,
	'orgForeignKey': '****',
	'platform': 'android',
	'platformName': 'Android',
	'projectGuid': '****',
	'projectName': '****',
	'scmType': 'git',
	'startedBy': '[Detected Changes]'
}

Cannot GET webhook

When I attempt to ping the webhook I am using, Unity Build doesn't send the ping. When pasting the url in my search bar, I get a blank http page that says Cannot GET /api/webhooks/CENSORED FIRST PART/iMRNTtx3UxSevTkv7FZ9Yi74G-Sap_ZmAEsVuYCbUrjROjU7Ly5wNn19uxT_q2VoLGAf/unity.

This occurs both via the website and manually doing it.
Please let me know if you need more details.

Steps to recreate error:

  1. Paste URL from webhook in site
  2. Paste New URL in Unity Cloud Build Webhook Section
  3. All options are on.

Steps Taken to fix:

  1. Used Pre-existing known working Webhook URL -> Same error
  2. Used a New webhook URL -> Same error
  3. Used Alternate Site with Pre-Existing URL -> No Error
  4. Used Alternate Site with new URL -> No Error.

An error has occured on skyhook for your webhook with provider bitbucket

Releated to #92
Test discord server: https://discord.gg/SRRecW2
Test bitbucket repository: https://bitbucket.org/szczepix/skyhook_test/src

When I merged pull request with checked

  • Close source branch
    I have bottom error:

Skyhook Error
An error has occured on skyhook for your webhook with provider bitbucket. Maybe you can copy/paste or screenshot this error if there is no sensitive information and open an issue on the skyhook GitHub.

Error: "TypeError: Cannot read property 'length' of undefined\n at BitBucket.<anonymous> (/app/dist/provider/Bitbucket.js:60:46)\n at Generator.next (<anonymous>)\n at /app/dist/provider/Bitbucket.js:6:71\n at new Promise (<anonymous>)\n at __awaiter (/app/dist/provider/Bitbucket.js:2:12)\n at BitBucket.repoPush (/app/dist/provider/Bitbucket.js:48:16)\n at BitBucket.<anonymous> (/app/dist/provider/BaseProvider.js:57:33)\n at Generator.next (<anonymous>)\n at fulfilled (/app/dist/provider/BaseProvider.js:3:58)\n at process._tickCallback (internal/process/next_tick.js:68:7)"

image

This is my webhook setup:

skyhook_test_01

Tell me if you need repository admin or webhook url.

HTTP 500 Error received from Skyhook when using /bitbucket

Hello,

I am attempting to use your service as a proxy between Discord and Bitbucket. I enter my generated webhook from Bitbucket into your website and then took the generated skyhook webhook and plugged it into Bitbucket. This is the url:

https://skyhook.glitch.me/api/webhooks/310283783116947459/HEY8xkoYCZEEn1iXRvsW2-OHQkcAU5M9PJPd-_G3VtxE--2EqqtVnjtU2amrHtKPQaKm/bitbucket

This is the response that Bitbucket got back.


<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Error</title>
</head>
<body>
<pre>TypeError: Cannot read property &#39;display_name&#39; of undefined<br> &nbsp; &nbsp;at Object.parse (/app/providers/bitbucket.js:34:158)<br> &nbsp; &nbsp;at /app/server.js:46:23<br> &nbsp; &nbsp;at Layer.handle [as handle_request] (/app/node_modules/express/lib/router/layer.js:95:5)<br> &nbsp; &nbsp;at next (/app/node_modules/express/lib/router/route.js:137:13)<br> &nbsp; &nbsp;at Route.dispatch (/app/node_modules/express/lib/router/route.js:112:3)<br> &nbsp; &nbsp;at Layer.handle [as handle_request] (/app/node_modules/express/lib/router/layer.js:95:5)<br> &nbsp; &nbsp;at /app/node_modules/express/lib/router/index.js:281:22<br> &nbsp; &nbsp;at param (/app/node_modules/express/lib/router/index.js:354:14)<br> &nbsp; &nbsp;at param (/app/node_modules/express/lib/router/index.js:365:14)<br> &nbsp; &nbsp;at param (/app/node_modules/express/lib/router/index.js:365:14)</pre>
</body>
</html>

The request: https://pastebin.com/qdZe7968

GitLab push() replace error

[Thu, 26 Oct 2017 21:00:26 GMT] Calling push() in GitLab provider.
4:00 PM
Error during parse: TypeError: Cannot read property 'replace' of undefined
4:00 PM
at Function.formatType (/app/util/BaseProvider.js:28:20)
4:00 PM
at GitLab.parse (/app/util/BaseProvider.js:17:29)
4:00 PM
at
4:00 PM
at process._tickCallback (internal/process/next_tick.js:169:7)

Discord Bitbucket bot not updating ?

Been using Skyhook to receive bitbucket repo push's and all issue updates, could you look into this please.

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Error</title>
</head>
<body>
<pre>ReferenceError: user is not defined<br> &nbsp; &nbsp;at Object.parse (/app/providers/bitbucket.js:146:22)<br> &nbsp; &nbsp;at /app/server.js:46:23<br> &nbsp; &nbsp;at Layer.handle [as handle_request] (/app/node_modules/express/lib/router/layer.js:95:5)<br> &nbsp; &nbsp;at next (/app/node_modules/express/lib/router/route.js:137:13)<br> &nbsp; &nbsp;at Route.dispatch (/app/node_modules/express/lib/router/route.js:112:3)<br> &nbsp; &nbsp;at Layer.handle [as handle_request] (/app/node_modules/express/lib/router/layer.js:95:5)<br> &nbsp; &nbsp;at /app/node_modules/express/lib/router/index.js:281:22<br> &nbsp; &nbsp;at param (/app/node_modules/express/lib/router/index.js:354:14)<br> &nbsp; &nbsp;at param (/app/node_modules/express/lib/router/index.js:365:14)<br> &nbsp; &nbsp;at param (/app/node_modules/express/lib/router/index.js:365:14)</pre>
</body>
</html>

GitLab Timeout

Hello,

I´ve created a Discord - GitLab Webbhook link with this website: https://skyhook.glitch.me/
But GitLab sent me this Error:

Hook execution failed: Net::ReadTimeout

How can I fix this error?

Pleas help me. Thanks...

GitLab error

Error during parse: TypeError: Cannot read property 'replace' of undefined
9:48 PM
at Function.formatType (/app/util/BaseProvider.js:7:20)
9:48 PM
at GitLab.parse (/app/util/BaseProvider.js:23:29)
9:48 PM
at
9:48 PM
at process._tickCallback (internal/process/next_tick.js:169:7)

GitLab CI issue

I've no idea what happened (hence the vague title) but I will tell you as much as I can.

I was working on a project attached to a private gitlab repo. All has been working fine, no issues like this have cropped up before. I was working on a branch, forms, which I then merged into dev. Forms locally was one commit ahead of forms remotely, and local dev was 2 commits ahead of remote dev (including the merge commit). I then pushed the two commits on my local dev branch to the remote dev branch.

We then have Gitlab CI automatically upload it to our server. This is where the 2 errors appeared.

https://ictman.tk/img/070818_03-11-08.png

The interesting thing is that I can't see which message caused the error - all the messages seemed to come through just fine.

Anyway, here's the error in text form. Both errors seem the exact same.

An error has occured on skyhook for your webhook with provider gitlab. Maybe you can screenshot this error and open an issue on the skyhook GitHub. Error: "TypeError: Cannot read property 'name' of undefined\n    at GitLab.<anonymous> (/app/dist/providers/GitLab.js:173:92)\n    at Generator.next (<anonymous>)\n    at /app/dist/providers/GitLab.js:6:71\n    at new Promise (<anonymous>)\n    at __awaiter (/app/dist/providers/GitLab.js:2:12)\n    at GitLab.build (/app/dist/providers/GitLab.js:172:16)\n    at GitLab.<anonymous> (/app/dist/model/BaseProvider.js:56:33)\n    at Generator.next (<anonymous>)\n    at fulfilled (/app/dist/model/BaseProvider.js:3:58)\n    at process._tickCallback (internal/process/next_tick.js:68:7)"

Edit: Definitely a CI issue. I cancelled a CI job, and the error appeared again:
https://ictman.tk/img/070818_03-22-54.png

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.