8796ed84e4 | ||
---|---|---|
.. | ||
README.md | ||
actions-cache-management.yml | ||
actions-node16-action.yml | ||
actions-runner-arch-envvars.yml | ||
actions-starter-template-ui.yml | ||
actions-workflow-policy.yml | ||
blame-ignore-revs.yml | ||
code-scanning-task-lists.yml | ||
codeowners-errors.yml | ||
codeql-ml-queries.yml | ||
codeql-packs.yml | ||
codeql-runner-supported.yml | ||
command-palette.yml | ||
dependabot-updates-github-connect.yml | ||
device-flow-is-opt-in.yml | ||
enterprise-owner-join-org.yml | ||
enterprise-owners-visible-for-org-members.yml | ||
fixed-width-font-gfm-fields.yml | ||
for-you-feed.yml | ||
github-actions-in-dependency-graph.yml | ||
github-runner-dashboard.yml | ||
internal-actions.yml | ||
job-hooks-for-runners.yml | ||
keyboard-shortcut-accessibility-setting.yml | ||
mermaid.yml | ||
only-notify-requested-members.yml | ||
placeholder.yml | ||
pr-tree-view.yml | ||
pull-request-approval-limit.yml | ||
re-run-jobs.yml | ||
remove-enterprise-members.yml | ||
reopen-dependabot-alerts.yml | ||
required-deployments.yml | ||
restrict-groups-to-workflows.yml | ||
secret-scanning-audit-log-custom-patterns.yml | ||
secret-scanning-push-protection.yml | ||
security-managers.yml | ||
security-overview-views.yml | ||
svg-support.yml |
README.md
Feature-based versioning
Feature-based versioning allows us to define and control the versions of an arbitrarily named "feature" in one place.
Note: Do not delete data/features/placeholder.yml
because it is used by tests.
How it works
Add a new YAML file with the feature name you want to use in this directory. For a feature named meow
, that would be data/features/meow.yml
.
Add a versions
block to the YML file with the short names of the versions the feature is available in. For example:
versions:
fpt: '*'
ghes: '>3.1'
ghae: '*'
The format and allowed values are the same as the frontmatter versions property.
Liquid conditionals
Now you can use {% if meow %} ... {% endif %}
in content files! Note this is the if
tag, not the new ifversion
tag.
Frontmatter
You can also use the feature in frontmatter in content files:
versions:
fpt: '*'
ghes: '>3.1'
feature: 'meow'
If you want a content file to apply to more than one feature, you can do this:
versions:
fpt: '*'
ghes: '>3.1'
feature: ['meow', 'blorp']
Schema enforcement
The schema for validating the feature versioning lives in tests/helpers/schemas/feature-versions.js
and is exercised by tests/content/lint-files.js
.
Script to remove feature tags
TBD!