Skip to content

Instantly share code, notes, and snippets.

View jameswilson's full-sized avatar

James Wilson jameswilson

View GitHub Profile
@jameswilson
jameswilson / claude_code_review_system_prompt_2026.md
Last active January 8, 2026 15:42
Claude Code Review Summary (custom system prompt) 2026
You are a senior software engineer performing a one-shot code review of a GitHub pull request.

Your role is to identify real issues, meaningful risks, and high-leverage improvements for a professional development team. Assume the author is competent. Prefer correctness and signal over verbosity.

This is a one-shot, non-interactive review.

All relevant context for this review is provided in the initial prompt (e.g. PR title, description, timestamps, diff, and any additional metadata explicitly included).
You will receive no follow-up input.
@jameswilson
jameswilson / hooks-common-post-code-deploy-environment-indicator.sh
Created June 26, 2025 21:17
Acquia Cloud Hooks environment-indicator.sh
#!/bin/bash
#hooks/common/post-code-deploy/environment-indicator.sh
set -e
site="$1"
target_env="$2"
source_branch="$3"
docroot="/var/www/html/$site.$target_env/docroot"
DRUSH_CMD="/var/www/html/$site.$target_env/vendor/bin/drush --root=$docroot"
@jameswilson
jameswilson / .platform.app.yaml
Created December 4, 2024 23:34
Make platform.sh Deploy hook idempotent
# This is an adaptation and simplication from the Platform.sh Drupal 10 templates:
# https://github.com/platformsh-templates/drupal10/blob/master/.platform.app.yaml
# https://github.com/platformsh-templates/drupal10/blob/master/drush/platformsh_deploy_drupal.sh
mounts:
# Create a persistent filesystem location to house the PREVIOUS_PLATFORM_TREE_ID
# value in a file that must be available for each build.
'/build_info':
source: local
source_path: 'build_info'
@jameswilson
jameswilson / acquia-cloud-clear-varnish.sh
Created October 8, 2024 20:33
Clear Varnish on Acquia Cloud after code push
#!/bin/sh
#
# Acquia Cloud Hook: post-code-deploy
#
# See https://github.com/acquia/cloud-hooks/blob/master/samples/post-code-deploy.tmpl
# See https://docs.acquia.com/acquia-cloud-platform/develop-apps/api/cloud-hooks
#
# Installation:
#
# 1. Place this file at `hooks/common/post-code-deploy/acquia-cloud-clear-varnish.sh` in your repository.
@jameswilson
jameswilson / bitbucket-pipelines.yml
Last active October 1, 2024 15:25
BitBucket Pipelines deploy to Acquia via ACLI
image: php:8.3
clone:
depth: full
pipelines:
branches:
develop:
- step:
script:
- scripts/ci/build.sh
- scripts/ci/test.sh
@jameswilson
jameswilson / create-release.sh
Last active April 29, 2024 14:01
Create a Drupal release
#!/usr/bin/env bash
###
### Description:
###
### Create and tag a release for deployment to the build system and
### remote hosting environment.
###
### Usage:
###
### ./scripts/create-release.sh [1.2.3]
@jameswilson
jameswilson / .gitlab-ci.yml
Last active November 8, 2024 18:20
GitLab CI build and deploy to Acquia
stages:
- Deploy
# @todo implement a Build and Test step to verify code quality before deploy
# IMPORTANT: `acli push:artifact` leverages composer internally to build dependencies, so no separate build step is required.
'Deploy to Acquia':
image: php:8.2
stage: Deploy
rules:
@jameswilson
jameswilson / deploy.sh
Created February 2, 2024 16:49
Acquia post-code-deploy tasks for Multisite Drupal 10, running Site Studio.
#!/bin/bash
# Deployment script for Acquia Cloud Next on a multisite (non-Site Factory) setup.
# Place this file in your repository at hooks/common/post-code-deploy/deploy.sh
# See https://github.com/acquia/cloud-hooks/blob/master/samples/post-code-deploy.tmpl
site="$1"
target_env="$2"
cd "/var/www/html/$site.$target_env/docroot"
@jameswilson
jameswilson / cohesion_git_history.sh
Created October 30, 2023 14:09
Cohesion Git History explorer
#/bin/bash
# For an unknown reason, the Acquia Site Studio repositories package their
# releases in a way that prevents comparing code changes between releases.
# Maybe this is intentional as a kind of security through obscurity. Maybe it
# is unintentional and just a part of a flawed release practice. Either way,
# the source code is GPL'ed on Github which lends itself to being able to track
# the changes between versions. That is exactly what this script does.
##
## Usage:
## ./cohesion_git_history.sh https://github.com/acquia/cohesion
@jameswilson
jameswilson / ddev-drupal-core-install
Created September 11, 2023 17:06
joachim-n/drupal-core-development-project for DDEV
#!/usr/bin/env bash
#
# Create a local environment leveraging DDEV for the specified Drupal core version.
#
# Installation:
# store this file in your /usr/local/bin or ~/bin and ensure it shows up in your $PATH
#
# Usage:
# ddev-drupal-core-install 11.x (bleeding edge)
# ddev-drupal-core-install 10.2.x