Skip to content

WillPresley/bitbucket-bulk-add-webhook

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Bitbucket Bulk Add Webhook

PHP script to add a specific webhook to all bitbucket account OR TEAM repositories at once. Can be used with a cron job to keep them up-to-date.

Update to Gentle's BitBucket API

This repo uses a modified version of the Gentle Software BitBucket API, properly looping through ALL repos from BB's JSON-paginated results, as seen in this commit.

Added "Semi-Silent" Command-Line Switch

I use this script on a schedule through Cygwin + Windows Task Scheduler, and log the output to logfiles in case of any issues, so I wanted a way to still get the overall success message logged properly, but silence the output when logging through repos that already contain the desired webhook. By simply adding the word true to the end of the command you can get this type of output, as seen below:

php bitbucket_bulk_add_webhook.php true

This option is disabled by default. It can also be easily modified to fully or further silence the script, should that be something needed in a particular use-case.

Usage

  • Download and unzip this package.
  • Open bitbucket_bulk_add_webhook.php in your favorite text editor, setup the CONFIG class on the top of the file.
  • Run the file through command line or upload this package to your webserver and execute it via url (be sure to secure it properly, it does contain a password in cleartext, be smart).

Do I need to run Composer?

No. All the files are already in this package. If you want, you can use composer to update the dependencies, but it's not necessary.

Requirements

PHP >= 5.4 with cURL extension.

License

The MIT License (MIT)

About

PHP script to add a specific webhook to all bitbucket account OR TEAM repositories at once. Can be used with a cron job to keep them up-to-date.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • PHP 100.0%