You can setup the configuration by adding parameters in extra
section of your composer
configuration file.
{
"extra": {
"composer-write-changelogs": {
"write-summary-file": "false",
"changelogs-dir-path": "my/custom/path",
"output-file-format": "json",
"webhook-url": "YOUR-URL",
"gitlab-hosts": [
"gitlab.my-company.org"
]
}
}
}
The configuration file is the composer.json
of your project.
By configuring this file, you configure only composer for the local project
The configuration file is the .composer
file of your computer.
This one allows to configure your composer on all your computer
Unlike Github or Bitbucket that have fixed domains, Gitlab instances are self-hosted so there is no way to automatically detects that a domain correspond to a Gitlab instance.
The gitlab-hosts
option can be setup to inform the plugin about the hosts it
should consider as Gitlab instance.
{
"extra": {
"composer-write-changelogs": {
"gitlab-hosts": [
"gitlab.my-company.org"
]
}
}
}
This option should contain the path of the directory where write summary feature will write changelogs files.
The path can be either absolute or relative to the composer.json
file containing the plugin
configuration.
By default, the changelogs directory will be created from the directory of the composer.json
file containing the plugin
configuration.
{
"extra": {
"composer-write-changelogs": {
"changelogs-dir-path": "my/custom/path"
}
}
}
By default, the file format for summaries is .txt
, but you can export it to a JSON
file instead.
The only 2 possible variables are json
and text
.
{
"extra": {
"composer-write-changelogs": {
"output-file-format": "json"
}
}
}
You can disable the plugin by adding write-summary-file
in the configuration extra.
{
"extra": {
"composer-write-changelogs": {
"write-summary-file": "false"
}
}
}
You can call a webhook with JSON data all times of an summary was created with this configuration.
{
"extra": {
"composer-write-changelogs": {
"webhook-url": "YOUR-URL"
}
}
}