Files
algo/.github
60f1cca03b Fix ansible-lint failures and code review sticky comments (#14885)
* Fix ansible-lint failures and improve linting configuration

This PR eliminates all ansible-lint failures (9 → 0) and reduces warnings
(25 → 20). The remaining warnings are yaml[line-length] which are
intentionally in the warn_list.

Changes:

1. GitHub workflow YAML compliance
   - Add document start markers (---)
   - Quote 'on:' key (YAML truthy value)

2. Replace ignore_errors with failed_when
   - privacy/clear_history.yml: Use failed_when: false instead of
     ignore_errors for tasks that may fail on clean systems

3. Use apt module instead of shell
   - privacy/auto_cleanup.yml: Replace apt-get shell command with
     proper apt module (autoclean: true)

4. Add changed_when to handlers and tasks
   - Handlers always run due to notifications, so changed_when: false
     is appropriate for read-only operations
   - Check commands that only read state get changed_when: false
   - Reboot task gets changed_when: true (it actually changes state)

5. Configure ansible-lint for project structure
   - Exclude CloudFormation templates (roles/cloud-*/files/) which use
     AWS-specific YAML tags (!Equals, !GetAtt) that ansible-lint
     cannot parse
   - Add mock_modules for custom modules in library/ directory that
     ansible-lint cannot auto-discover during static analysis
     See: https://github.com/ansible/ansible-lint/discussions/1353

6. Fix Jinja2 spacing
   - Remove extraneous whitespace in multi-line Jinja expressions
   - Fix spacing before closing parentheses

References:
- ansible-lint mock_modules: https://ansible.readthedocs.io/projects/lint/configuring/
- Custom module discovery issue: https://github.com/ansible/ansible-lint/discussions/1353
- Ansible local modules: https://docs.ansible.com/ansible/latest/dev_guide/developing_locally.html

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* Workaround sticky comment bug in claude-code-action

The use_sticky_comment feature is broken in claude-code-action v1.
This adds instructions for Claude to minimize its old comments as
OUTDATED before posting new reviews, preventing comment clutter.

Also adds gh api to allowed tools for the GraphQL mutation.

See: https://github.com/anthropics/claude-code-action/issues/419

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

---------

Co-authored-by: Claude <noreply@anthropic.com>
2025-11-28 02:06:59 -05:00
..