The PR and Issue labelling automation applies division labels to pull requests and issues.
This automation helps the user by:
- Automatically adding the division label of an approver, that is a maintainer, to a pull-request;
- Automatically adding the division label of an issue creator;
- Warning a pull-request creator whenever the labels
bughave not been applied and a comment will be added to the PR to remind the creator.
Enabling and configuring the labelling automation
- Capability defaults are defined in a
_defaults.ymlfile in this YAML format.
- Capability defaults will be applied to the repository if they are defined. Any capability default can be overridden if required in the repository config;
- The repository config file is located at
codebases/<capability name>/<repository name>.yml. If non existent you can create a new repository configuration file.
Configuration is slightly different between capability and repository config file.
In a capability you can define the defaults to be applied to the repositories like:
defaults: labels: pr-reviewer-division: true issue-author-division: true pr-size-reminder: true
In a repository you don’t need the
labels: pr-reviewer-division: true issue-author-division: true pr-size-reminder: true
Labels section keys
labels section enables and specifies the automatic labelling behaviour for PRs and Issues.
Add the pull request reviewer division when opening a new pull request.
Add the issue creator division when opening a issue.
Warn the user whenever the labels
bug have not been applied, via a comment in the pull request.
Capability and Repository full examples
description: > Inner Source documentation. owner: owner-1 maintainers: - maintainer-1 - maintainer-3 - maintainer-3 - maintainer-4 defaults: contributors: teams: [ all-users ] labels: pr-reviewer-division: true issue-author-division: true pr-size-reminder: true
description: > Internal inner source site and service. labels: pr-author-division: true pr-size-reminder: true
Feel free to reach out to the inner source team for any assistance.