Skip to main content

Danger

Danger automates code reviews through CI tools, aiding both code reviewers and developers who submit pull requests. It reduces the time reviewers spend on routine tasks, allowing more efficient code evaluation.

You can easily automate opened PRs with Appcircle's Danger integration.

For detailed information on the benefits that Danger, please refer to the following blog post:

Preview of Danger in CI: Automate Your Mobile Code Reviews - Appcircle Blog

danger

This tool does not support AzureDevOps. Therefore, if your repository is hosted on AzureDevOps, this tool will not function. Please use the Azure Bot for Swiftlint(for iOS) and Azure Bot for Detekt Report(for Android) components instead.

Prerequisites

Before running the Danger step, you must complete certain prerequisites, as detailed in the table below:

Prerequisite Workflow StepDescription
Git CloneThe repository needs to be cloned to begin the code review process. After this step, the variable $AC_REPOSITORY_DIR will be set.
caution

Note that this component synchronizes with the Appcircle Triggers. Without a setup trigger, opening a PR will not trigger the pipeline, and Danger will not function.

Screenshot

Input Variables

This step contains some input variable(s). It needs these variable(s) to work. The table below gives explanation for this variable(s).

Screenshot
Sensitive Variables

Please do not use sensitive variables such as Username, Password, API Key, or Personal Access Key directly within the step.

We recommend using Environment Variables groups for such sensitive variables.

Variable NameDescriptionStatus
$AC_REPOSITORY_DIRSpecifies the cloned repository directory. This path will be generated after the Git Clone step.Required
$AC_DANGER_PATHSpecifies path of Dangerfile. This path comes from $AC_REPOSITORY_DIR. If DangerFile is in main directory of your repository. Do not change.Required
$AC_DANGER_EXTRA_PARAMETERSExtra command line parameters. For Example: enter --verbose for verbose mode.Optional
$DANGER_GITHUB_API_TOKENGithub Access Token for the bot user.Optional
$DANGER_GITHUB_HOSTThe host that GitHub is running on. For example: git.corp.comOptional
$DANGER_GITHUB_API_BASE_URLThe host that the GitHub Enterprise API is reachable on. For example: https://git.corp.com/api/v3Optional
$DANGER_GITLAB_API_TOKENGitLab Access Token for the bot user.Optional
$DANGER_GITLAB_HOSTThe host that GitLab is running on. For example: git.corp.comOptional
$DANGER_GITLAB_API_BASE_URLThe host that the GitHub Enterprise API is reachable on. For example: https://git.corp.com/api/v4Optional
$DANGER_BITBUCKETCLOUD_USERNAMEBitbucket username for the bot user.Optional
$DANGER_BITBUCKETCLOUD_PASSWORDBitbucket password for the bot user.Optional
$DANGER_BITBUCKETCLOUD_UUIDBitbucket UUID of the bot user.Optional
$DANGER_BITBUCKETSERVER_USERNAMEBitbucket username for the bot user.Optional
$DANGER_BITBUCKETSERVER_PASSWORDBitbucket password for the bot user.Optional
$DANGER_BITBUCKETSERVER_HOSTThe host that Bitbucket is running on. For example: git.corp.comOptional

To access the source code of this component, please use the following link:

Preview of GitHub - appcircleio/appcircle-danger-component