Skip to content

Instantly share code, notes, and snippets.

@richmilne
richmilne / bitbucket_approve_pull.py
Last active June 2, 2022 19:47
Approve pull requests on BitBucket Server.
#! /usr/bin/env python3
"""Approve pull requests on BitBucket Server.
If you are trying to approve pull requests on BitBucket from external/3rd-
party tools (like Jenkins) there may be plugins available to do the job
automatically - if you're lucky. The `Bitbucket Approve Plugin`_ seems to be
one such plugin.
Unfortunately, it's only for the *CLOUD*-hosted version of Bitbucket. The
self-hosted version, Bitbucket Server (formerly known as Stash) uses a
@hectorcanto
hectorcanto / inventory.tf
Last active April 5, 2024 19:38
Produce an Ansible inventory from a Terraform template
data "template_file" "inventory" {
template = "${file("inventory.tpl")}"
vars {
backend_ip = "${aws_instance.backend.public_ip}"
frontend_ip = "${aws_instance.frontend.public_ip}"
landing_ip = "${aws_instance.landing.public_ip}"
key_path = "${var.instance_key_path}"
}
}