Coder Social home page Coder Social logo

bbwebhook's Introduction

Testing WebHooks

Initial Commit

{"push": {"changes": [{"forced": false, "old": null, "links": {"commits": {"href": "https://api.bitbucket.org/2.0/repositories/deevodavis/smartdeploy/commits?include=e65d3ae28558f83a91b2bdc236d0b208704dcb66"}, "html": {"href": "https://bitbucket.org/deevodavis/smartdeploy/branch/master"}}, "truncated": false, "commits": [{"hash": "e65d3ae28558f83a91b2bdc236d0b208704dcb66", "links": {"self": {"href": "https://api.bitbucket.org/2.0/repositories/deevodavis/smartdeploy/commit/e65d3ae28558f83a91b2bdc236d0b208704dcb66"}, "comments": {"href": "https://api.bitbucket.org/2.0/repositories/deevodavis/smartdeploy/commit/e65d3ae28558f83a91b2bdc236d0b208704dcb66/comments"}, "patch": {"href": "https://api.bitbucket.org/2.0/repositories/deevodavis/smartdeploy/patch/e65d3ae28558f83a91b2bdc236d0b208704dcb66"}, "html": {"href": "https://bitbucket.org/deevodavis/smartdeploy/commits/e65d3ae28558f83a91b2bdc236d0b208704dcb66"}, "diff": {"href": "https://api.bitbucket.org/2.0/repositories/deevodavis/smartdeploy/diff/e65d3ae28558f83a91b2bdc236d0b208704dcb66"}, "approve": {"href": "https://api.bitbucket.org/2.0/repositories/deevodavis/smartdeploy/commit/e65d3ae28558f83a91b2bdc236d0b208704dcb66/approve"}, "statuses": {"href": "https://api.bitbucket.org/2.0/repositories/deevodavis/smartdeploy/commit/e65d3ae28558f83a91b2bdc236d0b208704dcb66/statuses"}}, "author": {"raw": "Steve Davis [email protected]", "type": "author"}, "parents": [], "date": "2017-07-28T16:19:20+00:00", "message": "Initial commit\n", "type": "commit"}], "created": true, "closed": false, "new": {"type": "branch", "name": "master", "links": {"commits": {"href": "https://api.bitbucket.org/2.0/repositories/deevodavis/smartdeploy/commits/master"}, "self": {"href": "https://api.bitbucket.org/2.0/repositories/deevodavis/smartdeploy/refs/branches/master"}, "html": {"href": "https://bitbucket.org/deevodavis/smartdeploy/branch/master"}}, "target": {"hash": "e65d3ae28558f83a91b2bdc236d0b208704dcb66", "links": {"self": {"href": "https://api.bitbucket.org/2.0/repositories/deevodavis/smartdeploy/commit/e65d3ae28558f83a91b2bdc236d0b208704dcb66"}, "html": {"href": "https://bitbucket.org/deevodavis/smartdeploy/commits/e65d3ae28558f83a91b2bdc236d0b208704dcb66"}}, "author": {"raw": "Steve Davis [email protected]", "type": "author"}, "parents": [], "date": "2017-07-28T16:19:20+00:00", "message": "Initial commit\n", "type": "commit"}}}]}, "actor": {"username": "deevodavis", "type": "user", "display_name": "Steve Davis", "uuid": "{11d8996a-b771-4f36-8cbc-b66490801376}", "links": {"self": {"href": "https://api.bitbucket.org/2.0/users/deevodavis"}, "html": {"href": "https://bitbucket.org/deevodavis/"}, "avatar": {"href": "https://bitbucket.org/account/deevodavis/avatar/32/"}}}, "repository": {"scm": "git", "website": "", "name": "smartdeploy", "links": {"self": {"href": "https://api.bitbucket.org/2.0/repositories/deevodavis/smartdeploy"}, "html": {"href": "https://bitbucket.org/deevodavis/smartdeploy"}, "avatar": {"href": "https://bitbucket.org/deevodavis/smartdeploy/avatar/32/"}}, "full_name": "deevodavis/smartdeploy", "owner": {"username": "deevodavis", "type": "user", "display_name": "Steve Davis", "uuid": "{11d8996a-b771-4f36-8cbc-b66490801376}", "links": {"self": {"href": "https://api.bitbucket.org/2.0/users/deevodavis"}, "html": {"href": "https://bitbucket.org/deevodavis/"}, "avatar": {"href": "https://bitbucket.org/account/deevodavis/avatar/32/"}}}, "type": "repository", "is_private": true, "uuid": "{d3040e25-8464-4408-9325-2ab9ee73a1cb}"}}

Second Commit

{"push": {"changes": [{"forced": false, "old": {"type": "branch", "name": "master", "links": {"commits": {"href": "https://api.bitbucket.org/2.0/repositories/deevodavis/smartdeploy/commits/master"}, "self": {"href": "https://api.bitbucket.org/2.0/repositories/deevodavis/smartdeploy/refs/branches/master"}, "html": {"href": "https://bitbucket.org/deevodavis/smartdeploy/branch/master"}}, "target": {"hash": "e65d3ae28558f83a91b2bdc236d0b208704dcb66", "links": {"self": {"href": "https://api.bitbucket.org/2.0/repositories/deevodavis/smartdeploy/commit/e65d3ae28558f83a91b2bdc236d0b208704dcb66"}, "html": {"href": "https://bitbucket.org/deevodavis/smartdeploy/commits/e65d3ae28558f83a91b2bdc236d0b208704dcb66"}}, "author": {"raw": "Steve Davis [email protected]", "type": "author"}, "parents": [], "date": "2017-07-28T16:19:20+00:00", "message": "Initial commit\n", "type": "commit"}}, "links": {"commits": {"href": "https://api.bitbucket.org/2.0/repositories/deevodavis/smartdeploy/commits?include=902ff8619caf08a843eb6423bd44356377c25981&exclude=e65d3ae28558f83a91b2bdc236d0b208704dcb66"}, "html": {"href": "https://bitbucket.org/deevodavis/smartdeploy/branches/compare/902ff8619caf08a843eb6423bd44356377c25981..e65d3ae28558f83a91b2bdc236d0b208704dcb66"}, "diff": {"href": "https://api.bitbucket.org/2.0/repositories/deevodavis/smartdeploy/diff/902ff8619caf08a843eb6423bd44356377c25981..e65d3ae28558f83a91b2bdc236d0b208704dcb66"}}, "truncated": false, "commits": [{"hash": "902ff8619caf08a843eb6423bd44356377c25981", "links": {"self": {"href": "https://api.bitbucket.org/2.0/repositories/deevodavis/smartdeploy/commit/902ff8619caf08a843eb6423bd44356377c25981"}, "comments": {"href": "https://api.bitbucket.org/2.0/repositories/deevodavis/smartdeploy/commit/902ff8619caf08a843eb6423bd44356377c25981/comments"}, "patch": {"href": "https://api.bitbucket.org/2.0/repositories/deevodavis/smartdeploy/patch/902ff8619caf08a843eb6423bd44356377c25981"}, "html": {"href": "https://bitbucket.org/deevodavis/smartdeploy/commits/902ff8619caf08a843eb6423bd44356377c25981"}, "diff": {"href": "https://api.bitbucket.org/2.0/repositories/deevodavis/smartdeploy/diff/902ff8619caf08a843eb6423bd44356377c25981"}, "approve": {"href": "https://api.bitbucket.org/2.0/repositories/deevodavis/smartdeploy/commit/902ff8619caf08a843eb6423bd44356377c25981/approve"}, "statuses": {"href": "https://api.bitbucket.org/2.0/repositories/deevodavis/smartdeploy/commit/902ff8619caf08a843eb6423bd44356377c25981/statuses"}}, "author": {"raw": "Steve Davis [email protected]", "type": "author"}, "parents": [{"type": "commit", "hash": "e65d3ae28558f83a91b2bdc236d0b208704dcb66", "links": {"self": {"href": "https://api.bitbucket.org/2.0/repositories/deevodavis/smartdeploy/commit/e65d3ae28558f83a91b2bdc236d0b208704dcb66"}, "html": {"href": "https://bitbucket.org/deevodavis/smartdeploy/commits/e65d3ae28558f83a91b2bdc236d0b208704dcb66"}}}], "date": "2017-07-28T16:23:05+00:00", "message": "Second commit\n", "type": "commit"}], "created": false, "closed": false, "new": {"type": "branch", "name": "master", "links": {"commits": {"href": "https://api.bitbucket.org/2.0/repositories/deevodavis/smartdeploy/commits/master"}, "self": {"href": "https://api.bitbucket.org/2.0/repositories/deevodavis/smartdeploy/refs/branches/master"}, "html": {"href": "https://bitbucket.org/deevodavis/smartdeploy/branch/master"}}, "target": {"hash": "902ff8619caf08a843eb6423bd44356377c25981", "links": {"self": {"href": "https://api.bitbucket.org/2.0/repositories/deevodavis/smartdeploy/commit/902ff8619caf08a843eb6423bd44356377c25981"}, "html": {"href": "https://bitbucket.org/deevodavis/smartdeploy/commits/902ff8619caf08a843eb6423bd44356377c25981"}}, "author": {"raw": "Steve Davis [email protected]", "type": "author"}, "parents": [{"type": "commit", "hash": "e65d3ae28558f83a91b2bdc236d0b208704dcb66", "links": {"self": {"href": "https://api.bitbucket.org/2.0/repositories/deevodavis/smartdeploy/commit/e65d3ae28558f83a91b2bdc236d0b208704dcb66"}, "html": {"href": "https://bitbucket.org/deevodavis/smartdeploy/commits/e65d3ae28558f83a91b2bdc236d0b208704dcb66"}}}], "date": "2017-07-28T16:23:05+00:00", "message": "Second commit\n", "type": "commit"}}}]}, "actor": {"username": "deevodavis", "type": "user", "display_name": "Steve Davis", "uuid": "{11d8996a-b771-4f36-8cbc-b66490801376}", "links": {"self": {"href": "https://api.bitbucket.org/2.0/users/deevodavis"}, "html": {"href": "https://bitbucket.org/deevodavis/"}, "avatar": {"href": "https://bitbucket.org/account/deevodavis/avatar/32/"}}}, "repository": {"scm": "git", "website": "", "name": "smartdeploy", "links": {"self": {"href": "https://api.bitbucket.org/2.0/repositories/deevodavis/smartdeploy"}, "html": {"href": "https://bitbucket.org/deevodavis/smartdeploy"}, "avatar": {"href": "https://bitbucket.org/deevodavis/smartdeploy/avatar/32/"}}, "full_name": "deevodavis/smartdeploy", "owner": {"username": "deevodavis", "type": "user", "display_name": "Steve Davis", "uuid": "{11d8996a-b771-4f36-8cbc-b66490801376}", "links": {"self": {"href": "https://api.bitbucket.org/2.0/users/deevodavis"}, "html": {"href": "https://bitbucket.org/deevodavis/"}, "avatar": {"href": "https://bitbucket.org/account/deevodavis/avatar/32/"}}}, "type": "repository", "is_private": true, "uuid": "{d3040e25-8464-4408-9325-2ab9ee73a1cb}"}}

git diff --name-only e65d3ae28558f83a91b2bdc236d0b208704dcb66..902ff8619caf08a843eb6423bd44356377c25981

Third Commit

{"push": {"changes": [{"forced": false, "old": {"type": "branch", "name": "master", "links": {"commits": {"href": "https://api.bitbucket.org/2.0/repositories/deevodavis/smartdeploy/commits/master"}, "self": {"href": "https://api.bitbucket.org/2.0/repositories/deevodavis/smartdeploy/refs/branches/master"}, "html": {"href": "https://bitbucket.org/deevodavis/smartdeploy/branch/master"}}, "target": {"hash": "902ff8619caf08a843eb6423bd44356377c25981", "links": {"self": {"href": "https://api.bitbucket.org/2.0/repositories/deevodavis/smartdeploy/commit/902ff8619caf08a843eb6423bd44356377c25981"}, "html": {"href": "https://bitbucket.org/deevodavis/smartdeploy/commits/902ff8619caf08a843eb6423bd44356377c25981"}}, "author": {"raw": "Steve Davis [email protected]", "type": "author"}, "parents": [{"type": "commit", "hash": "e65d3ae28558f83a91b2bdc236d0b208704dcb66", "links": {"self": {"href": "https://api.bitbucket.org/2.0/repositories/deevodavis/smartdeploy/commit/e65d3ae28558f83a91b2bdc236d0b208704dcb66"}, "html": {"href": "https://bitbucket.org/deevodavis/smartdeploy/commits/e65d3ae28558f83a91b2bdc236d0b208704dcb66"}}}], "date": "2017-07-28T16:23:05+00:00", "message": "Second commit\n", "type": "commit"}}, "links": {"commits": {"href": "https://api.bitbucket.org/2.0/repositories/deevodavis/smartdeploy/commits?include=acc78ff4dce9b38f1c82459c8d4b5c2e4b7c7183&exclude=902ff8619caf08a843eb6423bd44356377c25981"}, "html": {"href": "https://bitbucket.org/deevodavis/smartdeploy/branches/compare/acc78ff4dce9b38f1c82459c8d4b5c2e4b7c7183..902ff8619caf08a843eb6423bd44356377c25981"}, "diff": {"href": "https://api.bitbucket.org/2.0/repositories/deevodavis/smartdeploy/diff/acc78ff4dce9b38f1c82459c8d4b5c2e4b7c7183..902ff8619caf08a843eb6423bd44356377c25981"}}, "truncated": false, "commits": [{"hash": "acc78ff4dce9b38f1c82459c8d4b5c2e4b7c7183", "links": {"self": {"href": "https://api.bitbucket.org/2.0/repositories/deevodavis/smartdeploy/commit/acc78ff4dce9b38f1c82459c8d4b5c2e4b7c7183"}, "comments": {"href": "https://api.bitbucket.org/2.0/repositories/deevodavis/smartdeploy/commit/acc78ff4dce9b38f1c82459c8d4b5c2e4b7c7183/comments"}, "patch": {"href": "https://api.bitbucket.org/2.0/repositories/deevodavis/smartdeploy/patch/acc78ff4dce9b38f1c82459c8d4b5c2e4b7c7183"}, "html": {"href": "https://bitbucket.org/deevodavis/smartdeploy/commits/acc78ff4dce9b38f1c82459c8d4b5c2e4b7c7183"}, "diff": {"href": "https://api.bitbucket.org/2.0/repositories/deevodavis/smartdeploy/diff/acc78ff4dce9b38f1c82459c8d4b5c2e4b7c7183"}, "approve": {"href": "https://api.bitbucket.org/2.0/repositories/deevodavis/smartdeploy/commit/acc78ff4dce9b38f1c82459c8d4b5c2e4b7c7183/approve"}, "statuses": {"href": "https://api.bitbucket.org/2.0/repositories/deevodavis/smartdeploy/commit/acc78ff4dce9b38f1c82459c8d4b5c2e4b7c7183/statuses"}}, "author": {"raw": "Steve Davis [email protected]", "type": "author"}, "parents": [{"type": "commit", "hash": "902ff8619caf08a843eb6423bd44356377c25981", "links": {"self": {"href": "https://api.bitbucket.org/2.0/repositories/deevodavis/smartdeploy/commit/902ff8619caf08a843eb6423bd44356377c25981"}, "html": {"href": "https://bitbucket.org/deevodavis/smartdeploy/commits/902ff8619caf08a843eb6423bd44356377c25981"}}}], "date": "2017-07-28T16:26:17+00:00", "message": "Third commit\n", "type": "commit"}], "created": false, "closed": false, "new": {"type": "branch", "name": "master", "links": {"commits": {"href": "https://api.bitbucket.org/2.0/repositories/deevodavis/smartdeploy/commits/master"}, "self": {"href": "https://api.bitbucket.org/2.0/repositories/deevodavis/smartdeploy/refs/branches/master"}, "html": {"href": "https://bitbucket.org/deevodavis/smartdeploy/branch/master"}}, "target": {"hash": "acc78ff4dce9b38f1c82459c8d4b5c2e4b7c7183", "links": {"self": {"href": "https://api.bitbucket.org/2.0/repositories/deevodavis/smartdeploy/commit/acc78ff4dce9b38f1c82459c8d4b5c2e4b7c7183"}, "html": {"href": "https://bitbucket.org/deevodavis/smartdeploy/commits/acc78ff4dce9b38f1c82459c8d4b5c2e4b7c7183"}}, "author": {"raw": "Steve Davis [email protected]", "type": "author"}, "parents": [{"type": "commit", "hash": "902ff8619caf08a843eb6423bd44356377c25981", "links": {"self": {"href": "https://api.bitbucket.org/2.0/repositories/deevodavis/smartdeploy/commit/902ff8619caf08a843eb6423bd44356377c25981"}, "html": {"href": "https://bitbucket.org/deevodavis/smartdeploy/commits/902ff8619caf08a843eb6423bd44356377c25981"}}}], "date": "2017-07-28T16:26:17+00:00", "message": "Third commit\n", "type": "commit"}}}]}, "actor": {"username": "deevodavis", "type": "user", "display_name": "Steve Davis", "uuid": "{11d8996a-b771-4f36-8cbc-b66490801376}", "links": {"self": {"href": "https://api.bitbucket.org/2.0/users/deevodavis"}, "html": {"href": "https://bitbucket.org/deevodavis/"}, "avatar": {"href": "https://bitbucket.org/account/deevodavis/avatar/32/"}}}, "repository": {"scm": "git", "website": "", "name": "smartdeploy", "links": {"self": {"href": "https://api.bitbucket.org/2.0/repositories/deevodavis/smartdeploy"}, "html": {"href": "https://bitbucket.org/deevodavis/smartdeploy"}, "avatar": {"href": "https://bitbucket.org/deevodavis/smartdeploy/avatar/32/"}}, "full_name": "deevodavis/smartdeploy", "owner": {"username": "deevodavis", "type": "user", "display_name": "Steve Davis", "uuid": "{11d8996a-b771-4f36-8cbc-b66490801376}", "links": {"self": {"href": "https://api.bitbucket.org/2.0/users/deevodavis"}, "html": {"href": "https://bitbucket.org/deevodavis/"}, "avatar": {"href": "https://bitbucket.org/account/deevodavis/avatar/32/"}}}, "type": "repository", "is_private": true, "uuid": "{d3040e25-8464-4408-9325-2ab9ee73a1cb}"}}

git diff --name-only 902ff8619caf08a843eb6423bd44356377c25981..acc78ff4dce9b38f1c82459c8d4b5c2e4b7c7183

push.changes.target.hash ==== OLD COMMIT push.changes.commits.hash ==== NEW COMMIT

push.changes[0].new.target.hash = NEW push.changes[0].new.target.parent.hash = OLD

curl -v -u [email protected]:[Jira2407] https://bitbucket.org/api/1.0/repositories/deevodavis/smartdeploy curl -v -u [email protected]:[Jira2407] https://bitbucket.org/api/2.0/repositories/deevodavis/smartdeploy/commits curl -v -u [email protected]:[Jira2407] https://bitbucket.org/api/2.0/repositories/deevodavis/smartdeploy/diff/d32408bfd6f099c52037d8b2a100503409fb9b5f

curl -u [email protected]:[Jira2407] https://bitbucket.org/api/2.0/repositories/deevodavis/smartdeploy/diff/acc78ff4dce9b38f1c82459c8d4b5c2e4b7c7183 | grep "diff --git" | cut -d' ' -f3 curl -u [email protected]:[Jira2407] https://bitbucket.org/api/2.0/repositories/deevodavis/smartdeploy/diff/acc78ff4dce9b38f1c82459c8d4b5c2e4b7c7183 | grep "diff --git" | cut -d' ' -f3 | sed 's/^a///g'

curl -u [email protected]:[Jira2407] https://bitbucket.org/api/2.0/repositories/deevodavis/smartdeploy/diff/098c38a | grep "diff --git" | egrep -v "curl" | cut -d' ' -f3 | sed 's/^a///g'

Jenkins

curl -X POST http://steve:password@localhost:7070/job/gradle_demo/build

Be sure to turn off the cross site forgery check though...

bbwebhook's People

Contributors

deevodavis71 avatar

Watchers

 avatar  avatar

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.