Skip to content

feat: [#446] add dependencies update automation script and skill#447

Merged
josecelano merged 4 commits intotorrust:mainfrom
josecelano:446-add-update-dependencies-script
Apr 13, 2026
Merged

feat: [#446] add dependencies update automation script and skill#447
josecelano merged 4 commits intotorrust:mainfrom
josecelano:446-add-update-dependencies-script

Conversation

@josecelano
Copy link
Copy Markdown
Member

Changes

This PR adds comprehensive automation for the dependency update workflow:

1. Scripts

  • scripts/update-dependencies.sh: Fully automated dependency update lifecycle
    • Handles branch creation, cargo update, pre-commit checks, signed commits, push, and optional PR creation
    • Supports flexible branch naming and remote configuration
    • Includes guard against working tree issues
    • Captures full cargo update output in commit messages

2. Documentation

  • docs/contributing/README.md: Added Dependency Update Automation section with usage examples
  • .github/skills/dev/maintenance/update-dependencies/skill.md: Comprehensive Agent Skill for the workflow
    • Quick reference for simple vs. complex updates
    • Step-by-step examples with and without issue numbers
    • Troubleshooting guide

3. Project Configuration

  • project-words.txt: Added 'worktree' for spell checking

4. Documentation Consistency

  • AGENTS.md: Added GPG commit signing requirement
  • .github/skills/dev/git-workflow/commit-changes/skill.md:
    • Added GPG commit signing as mandatory
    • Updated examples and troubleshooting

Workflow

Simple updates (no issue required):

./scripts/update-dependencies.sh --branch update-dependencies --push-remote {fork-remote} --create-pr

Complex updates (with issue):

./scripts/update-dependencies.sh --branch {issue-number}-update-dependencies --push-remote {fork-remote} --create-pr

All commits are signed with GPG (-S).

Related

  • Partially addresses dependency management automation needs
  • Complements existing pre-commit infrastructure

Add `scripts/update-dependencies.sh` to automate the dependency update
workflow. The script handles the full lifecycle from branch creation
to optional PR creation:

1. Verifies a clean working tree
2. Fetches and fast-forwards the base branch from the upstream remote
3. Creates (or recreates) the feature branch
4. Runs `cargo update` and captures the full output
5. Exits early if no Cargo.lock changes are produced
6. Optionally runs `./scripts/pre-commit.sh`
7. Commits the `Cargo.lock` changes with the full `cargo update`
   output in the commit body (signed by default via `git commit -S`)
8. Pushes the branch to the fork remote
9. Optionally creates a PR via `gh pr create`

Usage:

    ./scripts/update-dependencies.sh \
      --branch 446-update-dependencies \
      --push-remote josecelano \
      --create-pr

See `./scripts/update-dependencies.sh --help` for all options.

Also adds `worktree` to project-words.txt (used in function name
`ensure_clean_worktree`) and documents the script in
`docs/contributing/README.md`.
@josecelano josecelano self-assigned this Apr 13, 2026
@josecelano
Copy link
Copy Markdown
Member Author

ACK 08bef3e

1 similar comment
@josecelano
Copy link
Copy Markdown
Member Author

ACK 08bef3e

@josecelano josecelano merged commit 0de64ab into torrust:main Apr 13, 2026
15 checks passed
@josecelano josecelano deleted the 446-add-update-dependencies-script branch April 13, 2026 10:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant