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 API is enabled by default but requires an API key to be used. API keys are scoped to a GitHub organization. There are two ways to generate these keys.
(Recommended) You can allow any GitHub organization to manage its application key in the dashboard by enabling the dashboard page with this environment variable:
MERGIFYENGINE_DASHBOARD_UI_FEATURES=applications
This method will become the default in future releases.
(Not recommended) You can define API keys on the server side.
You must define as API key a random 64 chars long string for each organization and set them in your environment variables like this:
MERGIFYENGINE_APPLICATION_APIKEYS=<api-key>:<organization_account_id>:<organization_account_login>,...
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