Skip to content

Latest commit

 

History

History
88 lines (67 loc) · 3.69 KB

AGENTS.md

File metadata and controls

88 lines (67 loc) · 3.69 KB

Agent Instructions — action-detect-relevant-changes

Repository Purpose

Detect changes matching file type and glob filters between two refs

This repository contains a single composite GitHub Action previously bundled within Framework-R-D/phlex and extracted for standalone reuse.

Action Interface

Inputs:

Name Description Required Default
repo-path Path to the checked-out repository True
base-ref Git reference or commit hash representing the diff base False
head-ref Git reference or commit hash representing the diff head False
file-type File type key or list of keys (comma or newline separated) False
include-globs Optional glob filters (comma or newline separated) False
exclude-globs Optional glob filters to exclude (comma or newline separated) False
type-pattern-add Additional type-to-glob mappings (comma or newline separated, e.g. cpp:*.cc). '.in' variants are added automatically. False

Outputs:

Name Description
matched true if matching files were found
matched_files Newline-delimited list of matching files

Repository Structure

Path Purpose
action.yaml The composite action definition
CHANGELOG.md Per-version changelog (dependabot reads this)
RELEASES.md Release procedure and checklist
README.md Usage documentation
LICENSE Apache 2.0
.github/release.yaml Autogenerated release notes config
.github/workflows/ci.yaml CI: actionlint, YAML, Markdown, CodeQL
.github/dependabot.yml Weekly dependency updates

Development Workflow

  • All changes via pull request to main.
  • CI runs on every PR: actionlint, YAML lint, Markdown lint, CodeQL (actions language).
  • Use prek run (or pre-commit run) before pushing to catch formatting issues locally.
  • Dependabot opens weekly PRs for action pin updates. They are not auto-merged (no auto-merge workflow is configured); review and merge them manually, or configure branch protection + an auto-merge workflow as a follow-on.

Coding Standards

  • action.yaml: all uses: references must be SHA-pinned with a # vN comment. Version-tag pins (e.g. @v4) are not acceptable.
  • YAML: formatted with prettier (120-char soft limit, 2-space indent).
  • Markdown: must pass markdownlint with the rules in .markdownlint.jsonc.
  • Python (generate-build-matrix only): ruff + mypy clean; Google-style docstrings; type hints required; tests in tests/ with pytest.

Release Procedure

See RELEASES.md for the complete step-by-step checklist.

Phlex Ecosystem Context

This action is part of the Framework-R-D action ecosystem supporting the Phlex framework. When releasing a new version, check whether dependent actions (those that uses: this action in their own action.yaml) also need updating. The dependency graph is:

  • Level 0 (no internal deps): detect-act-env, detect-relevant-changes, get-pr-info, setup-build-env, configure-cmake, build-cmake, collect-format-results, complete-pr-comment, generate-build-matrix, post-clang-tidy-results, handle-fix-commit
  • Level 1 (depend on Level 0): prepare-check-outputs, prepare-fix-outputs, run-change-detection
  • Level 2 (depends on Level 1): workflow-setup

CI Coverage Note

actionlint scans .github/workflows/*.y{a,}ml only; it does not lint action.yaml (a composite action definition, not a workflow). Coverage of action.yaml correctness comes from the CodeQL actions analysis, which does inspect composite action definitions.