Skip to content

Commit

Permalink
qs script
Browse files Browse the repository at this point in the history
  • Loading branch information
miriamgoldman committed Sep 5, 2024
1 parent 58e55ca commit 5613bac
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions private/lock-multidevs.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<?php
// Auto-lock new environments.

if ( defined( 'PANTHEON_ENVIRONMENT' ) && isset( $_POST['environment'] ) ) {

$data = json_encode(
[
'type' => 'lock_environment', // Workflow type.
'environment' => PANTHEON_ENVIRONMENT,
'params' => [
"username" => PANTHEON_SITE_NAME,
"password" => PANTHEON_SITE_NAME . '-' . PANTHEON_ENVIRONMENT,
]
]
);

var_dump( $data );

/*
echo "--- Start workflow: lock_environment -- \n\n";
$result = pantheon_curl('https://api.live.getpantheon.com/sites/self/environments/self/workflows', $data, 8443, 'POST');
echo "--- End workflow: lock_environment -- \n\n";
*/
}

0 comments on commit 5613bac

Please sign in to comment.