Mergify Enterprise
ArchitectureRequirementsInstallationManual Installation (Legacy)Advanced FeaturesTroubleshootingMaintenanceRelease NotesUsing bot_account
features
Some Mergify actions have an option named bot_account
to set the login that Mergify impersonates to run the action. To act on their behalf, Mergify needs personal access tokens with at least the repo
scope.
To pass those access token to the engine, you need to set them in your environment variables like this:
MERGIFYENGINE_ACCOUNT_TOKENS=id1:login1:token1,id1:login2:token2
In each repository that wants to use one of these accounts, you must add in its .mergify.yml
configuration file:
defaults:
actions:
rebase:
bot_account: login1
update:
bot_account: login1
squash:
bot_account: login1
edit:
bot_account: login1
queue:
update_bot_account: login1
merge:
update_bot_account: login1
Enabling Mergify API
Mergify provides a REST API. To enable it set the environment variable:
MERGIFYENGINE_API_ENABLE=1
API keys are scoped to a GitHub organization and must be a random 64 chars long string, you can set them in your environment variables like this:
MERGIFYENGINE_APPLICATION_APIKEYS=<api-key>:organization_account_id,...
Datadog Integration
Enabling metrics
Mergify can send metrics to Datadog via the statsd
protocol. You can enable metrics by adding these environment variables:
DD_TRACE_ENABLED=1
DD_DOGSTATSD_DISABLE=0
DD_AGENT_HOST=<my-datadog-agent-host>
DD_DOGSTATSD_PORT=8125
GUNICORN_CMD_ARGS="--statsd-host=<my-datadog-agent-host>:8125"
Enabling logging
Mergify can send logs to the Datadog agent UDP log server receiver.
On your Datadog agent, you need to create the configuration file /etc/datadog-agent/mergify-engine.d/conf.yaml
with the following content to activate the log receiver:
init_config:
instances:
logs:
- type: udp
port: 10518
source: python
service: mergify-engine
sourcecategory: sourcecode
Then you can send the Mergify log to Datadog by adding these environment variables for the engine container:
MERGIFYENGINE_LOG_DATADOG=udp://<my-datadog-agent-host>:10518