Ensure workflow configuration (env vars, inputs, config lists) has a single authoritative definition and a clearly documented consumer.
Apply this when editing GitHub Actions/workflow configs or config-driven automation:
env: and step env:) unless the override is intentional and documented. Prefer keeping the setting only where it’s consumed.Example (pattern): derive the maintainer list once and reuse it, instead of duplicating:
- name: Classify
id: classify
run: |
# router outputs JSON including full maintainer list
result="$(node router.mjs ... )"
echo "maintainers=$(echo "$result" | jq -c '.maintainers')" >> "$GITHUB_OUTPUT"
- name: Apply review requests
env:
MAINTAINERS: '${{ steps.classify.outputs.maintainers }}'
run: |
# use MAINTAINERS as the single source of truth
node apply.mjs --maintainers "$MAINTAINERS"
This prevents drift, makes changes predictable, and avoids confusing behavior caused by precedence/overrides or unused settings.
Enter the URL of a public GitHub repository