From a121b0b35f937085839729481f6d6b25b42110cb Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 20 Aug 2026 19:39:09 +0000 Subject: [PATCH] docs: weekly sync MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sync docs/ with commits landed on main since the previous weekly sync: - Add web command `twig-grepper` (commands/web/twig-grepper) — maps `__TwigTemplate_*` classes from a pasted backtrace to source templates. - Add host command `package-checker-and-card-maker` (aliases: `paccma`, `paccman`) — scans a GitLab group for composer packages and creates "Update Dependencies" Teamwork cards, with `--dry-run` and `--auto-assign` (Deputy/Guardian/DM). - Update `open-issue` docs to describe the new `-c` flag (copy-and-print only, no browser open). - Update `tw-new` docs to describe the new optional person-assignment step. - Update `env-setup` docs to describe the new Guardian/Deputy/DM/AM people options that persist `TEAMWORK_*_ID` values to `.ddev/.env.anner`. Co-Authored-By: Claude --- docs/host-commands.md | 7 ++++--- docs/web-commands.md | 1 + 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/docs/host-commands.md b/docs/host-commands.md index b313ea0..e80ad09 100644 --- a/docs/host-commands.md +++ b/docs/host-commands.md @@ -20,7 +20,7 @@ These commands run on the developer's host machine (via `ddev `), from - `devmode` — Toggles Drupal between development settings (`settings.local.devmode.php`) and performance/production settings (`settings.local.perfmode.php`) by copying the relevant file to `settings.local.php`, updating the `development_settings` key-value store, and rebuilding cache. Usage: `devmode [off|on]`. - `drupal-operations-center` — Interactive fzf menu offering to download the js-cookie library into `web/libraries/js-cookie`, or to clear the `update_fetch_task` key-value store to fix the Drupal updates report page. Aliases: `drupal-operations`. - `drupal-updater` — Automates Drupal core/contrib updates: snapshots the DB, updates contrib modules individually via Composer (with optional per-module git commits), and handles core/core-recommended updates together. Supports flags for dry-run, security-only updates, omitting snapshots, running DB updates, and interactive per-item confirmation. -- `env-setup` — Interactive fzf menu to set the Teamwork board (`TEAMWORK_PROJECT_ID`) or toggle the project's LIVE/BUILD mode, persisting both to `.ddev/.env.anner` via `ddev dotenv set`. +- `env-setup` — Interactive fzf menu to set the Teamwork board (`TEAMWORK_PROJECT_ID`), toggle the project's LIVE/BUILD mode, or record the Teamwork people associated with the project — Guardian (`TEAMWORK_GUARDIAN_ID`), Deputy (`TEAMWORK_DEPUTY_ID`), DM (`TEAMWORK_DM_ID`), and AM (`TEAMWORK_AM_ID`) — for use by commands like `package-checker-and-card-maker --auto-assign`. All values are persisted to `.ddev/.env.anner` via `ddev dotenv set`. - `githooks` — Copies all files from `.ddev/scripts/git-hooks/` into `.git/hooks` to install the project's git hooks. - `glab-mr-link` — Opens the current branch's GitLab merge request in a browser (`-o`) or copies its URL to the clipboard. Aliases: `mr-link`. - `holdmybeer` — One-shot start-of-work automation: stashes local changes, pulls the default branch, fetches the Teamwork card title, creates a branch, starts DDEV, pulls the remote DB, and exports config. Requires `TEAMWORK_API_KEY`/`TEAMWORK_DOMAIN`. Aliases: `holdmybeer`, `hmb`. @@ -29,7 +29,8 @@ These commands run on the developer's host machine (via `ddev `), from - `login` — Opens a `drush uli` one-time-login link in a browser (or prints the URL if `ANNERTECH_LOCAL_DEV` is set). - `mr` — Pushes the current branch and creates a draft GitLab MR via `glab mr create`, prefilling the title from the branch's `T-` and description suffix. - `open-board` — Opens the Teamwork board for the project, building the URL from `TEAMWORK_PROJECT_ID`/`TEAMWORK_DOMAIN` in `.ddev/.env.anner`. Aliases: `tw-board`. -- `open-issue` — Opens (and copies to clipboard) the Teamwork task URL for the `T-` in the current branch name, falling back to the previous branch if needed. Aliases: `tw-open`. +- `open-issue` — Opens the Teamwork task URL for the `T-` in the current branch name and copies it to the clipboard; falls back to the previous branch if needed. Pass `-c` to copy (and print) the URL only, without opening a browser. Aliases: `tw-open`. +- `package-checker-and-card-maker` — Combines `package-checker` with automatic Teamwork card creation: scans every project in a GitLab group for one or more Composer packages and creates an "Update Dependencies" card on each matching project's Teamwork board. Reads `TEAMWORK_PROJECT_ID` from the repo's `.ddev/.env.anner`. Supports `--dry-run` (show what would happen without creating cards) and `--auto-assign` (assigns the card to the people whose IDs are stored as `TEAMWORK_DEPUTY_ID`, `TEAMWORK_GUARDIAN_ID`, and `TEAMWORK_DM_ID` in the same `.env.anner`). Uses the same GitLab backend (glab or curl) and package/version-range syntax as `package-checker`. Requires `TEAMWORK_API_KEY` and `TEAMWORK_DOMAIN`. Aliases: `paccma`, `paccman`. - `package-checker` — Scans every project in a GitLab group for usage (and version) of one or more Composer packages (`vendor/package` or `vendor/package:max-insecure-version`, OR-matched) by reading each project's `composer-manifest.yaml`, optionally flagging insecure versions; a project is reported as a single aggregated line listing every matching package, in red if any match is insecure. Aliases: `wtfiow`. - `protect` — Enables/disables/resets HTTP basic-auth protection on a nixOS-hosted dev project via nginx config and htpasswd; no-ops unless `ANNERTECH_LOCAL_DEV` is set. - `remote-db` — Pulls the latest database (skipping files) from the configured upstream provider (`DDEV_UPSTREAM_PROVIDER` in `.ddev/.env.anner`) via `ddev pull --skip-files -y`. @@ -43,7 +44,7 @@ These commands run on the developer's host machine (via `ddev `), from - `tw-batch-card-maker` — Interactively creates the same new Teamwork card across multiple selected "support" Teamwork projects, posting to each project's Cards tasklist. - `tw-comment` — Posts a comment to a Teamwork task, resolving the task ID from `-t`, the branch name, the previous branch, or an interactive prompt. Aliases: `comment`. - `tw-description` — Appends a structured "Deployment notes" section (date, MR link, branch, checklist) to a Teamwork task's description, optionally including the Upsun Dev environment URL. -- `tw-new` — Interactively creates a new Teamwork task (project, tasklist, title, markdown description) and tags it via `tw-tag-issue`. +- `tw-new` — Interactively creates a new Teamwork task (project, tasklist, title, markdown description) and tags it via `tw-tag-issue`. Optionally assigns the new task to a Teamwork person (chosen via fzf from the project's member list). - `tw-tag-issue` — Adds tags to a Teamwork task by fetching existing tags and presenting all available tags via fzf multi-select. Aliases: `tw-tag`. - `tw-timelog` — Logs time to a Teamwork task, parsing flexible time formats (`1h15m`, `75m`, decimal hours, `H:MM:SS`) and rounding up to the nearest 15 minutes. Aliases: `timelog`, `timeslip`. - `upsun-command-center-bash` — Interactive (or argument-driven) "Upsun Command Centre" menu: Drush ULI, Drupal config status, activities, running-activity view, SSH, resume environment, disk allocation helper, log checkers (plain and goaccess), access-log download, environment backup, Fastly API token, dashboard — each delegating to a corresponding `_lib/upsun-*.sh` helper. Aliases: `uptools`, `uptool`, `platform-ulitool`, `ulitool`, `platform-resume`, `ucc` (the header lists `ucc` twice — likely a stale duplicate). diff --git a/docs/web-commands.md b/docs/web-commands.md index 1d746aa..7946661 100644 --- a/docs/web-commands.md +++ b/docs/web-commands.md @@ -13,5 +13,6 @@ Note: `install-varnish` exists in this directory but is intentionally not docume - `platform` — Thin wrapper that runs `upsun "$@"` inside the container — a back-compat alias pointing at the `upsun` binary. - `rector` — Runs Rector (Drupal-Rector). If `rector.php` exists, installs `palantirnet/drupal-rector` on demand if missing and runs `vendor/bin/rector process web/modules/custom/ "$@"`. If no config is found, prints setup instructions and exits 1. - `robo` — Thin wrapper that runs `robo "$@"` inside the container to invoke project Robo tasks. +- `twig-grepper` — Maps `__TwigTemplate_*` class names from a pasted backtrace to their source template files. Accepts a file argument or piped input (e.g., `pbpaste | ddev twig-grepper`, `wl-paste | ddev twig-grepper`). Searches the Drupal Twig cache (`web/sites/default/files/php/twig/`) and prints the original template path for each class, or "not in cache" if not found. - `solr-update-config` — Updates Solr config. If the project's own Robo file defines `solr:update-conf`, delegates to it; otherwise generates `config.zip` via `drush search-api-solr:get-server-config`, unzips it into `.ddev/solr/conf/` and `.platform/solr-conf/8.x/`, then removes the zip. Restricted to drupal10/drupal11 project types. - `upsun` — Thin wrapper that runs `upsun "$@"` inside the container — the canonical way to invoke the Upsun (formerly Platform.sh) CLI, e.g. `ddev upsun drush uli`.