@maggioli-rd/sr-codeowners-plugin
TypeScript icon, indicating that this package has built-in type declarations

1.14.0 • Public • Published

@maggioli-rd/sr-codeowners-plugin

npm next version

Step Description
verifyConditions Execute a shell command to verify if the CODEOWNERS file can be created.
verifyRelease Execute a shell command to create the CODEOWNERS file.

Configuration

Options Description Default
excludeRegex RegEx to exclude authors when creating the CODEOWNERS file. ""
header String inserted in the first line of the CODEOWNERS file as header. Autogen comment (see code)
codeownersPath Path where to create the CODEOWNERS file. .gitlab/CODEOWNERS
limit Number of authors obtained from the ranking of authors with the most commits. 3
leaderboard Generates the ranking of authors with the most commits and includes it as a comment in the CODEOWNERS file. true

Install

$ npm install @maggioli-rd/sr-codeowners-plugin -D

Usage

The plugin can be configured in the semantic-release configuration file:

{
  "plugins": [
    "@semantic-release/commit-analyzer",
    "@semantic-release/release-notes-generator",
    ["@semantic-release/git", {
      "assets": [
        "CHANGELOG.md",
        "pubspec.yaml",
        "CODEOWNERS"
      ],
      "message": "chore(release): ${nextRelease.version}\n\n${nextRelease.notes}"
    }],
    ["@maggioli-rd/sr-codeowners-plugin", {
        "excludeRegex": "semantic-release-bot",
        "codeownersPath": "CODEOWNERS",
        "limit": 2
      }]
  ]
}

Shareable-Configuration Extension Example (release.config.js)

var config = require('@maggioli-rd/semantic-release-flutter');
var gitPluginIndex = config.plugins.findIndex((plugin) => plugin.includes("@semantic-release/git"))

config.plugins[gitPluginIndex][1]["assets"].push(".gitlab/CODEOWNERS")

config.plugins.push(
      ["@maggioli-rd/sr-codeowners-plugin", {
        "excludeRegex": "RenovateBot|semantic-release-bot",
        "limit": 5,
        "header": "My personal header"
      }]
)
module.exports = config

Resources

Package Sidebar

Install

npm i @maggioli-rd/sr-codeowners-plugin

Weekly Downloads

63

Version

1.14.0

License

ISC

Unpacked Size

26.3 kB

Total Files

15

Last publish

Collaborators

  • aleneri
  • filippo.paganelli