Skip to content

Commit

Permalink
Removes the troubleshooting page, adds it as a redirect in danger.sys…
Browse files Browse the repository at this point in the history
…tems
  • Loading branch information
orta committed Mar 11, 2018
1 parent c914f2f commit 327231d
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 3 deletions.
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

## Master

* Add BitBucket Server support. [@azz][]
* Add BitBucket Server support.

To use Danger JS with BitBucket Server: you'll need to create a new account for Danger to use,
then set the following environment variables on your CI:
Expand Down Expand Up @@ -52,6 +52,8 @@
activities: BitBucketServerPRActivity[]
```

* [@azz][]

- Improve path generator for danger-runner.
- Update the PR DSL to include bots. [@orta][]

Expand Down
2 changes: 0 additions & 2 deletions docs/guides/troubleshooting.html

This file was deleted.

44 changes: 44 additions & 0 deletions docs/usage/bitbucket_server.html.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
---
title: Danger + BitBucket Server
subtitle: Dangerous bits
layout: guide_js
order: 4
blurb: Some examples of Danger with BitBucket Server
---

To use Danger JS with BitBucket Server: you'll need to create a new account for Danger to use,
then set the following environment variables on your CI:

* `DANGER_BITBUCKETSERVER_HOST` = The root URL for your server, e.g. `https://bitbucket.mycompany.com`.
* `DANGER_BITBUCKETSERVER_USERNAME` = The username for the account used to comment.
* `DANGER_BITBUCKETSERVER_PASSWORD` = The password for the account used to comment.

Then you will have a fully fleshed out `danger.bitbucket_server` object in your Dangerfile to work with,
for example:

```ts
import { danger, warn } from "danger"

if (danger.bitbucket_server.pr.title.includes("WIP")) {
warn("PR is considered WIP")
}
```

The DSL is fully fleshed out, you can see all the details inside the [Danger JS Reference][ref],
but the summary is:

```ts
danger.bitbucket_server.
/** The pull request and repository metadata */
metadata: RepoMetaData
/** The related JIRA issues */
issues: JIRAIssue[]
/** The PR metadata */
pr: BitBucketServerPRDSL
/** The commits associated with the pull request */
commits: BitBucketServerCommit[]
/** The comments on the pull request */
comments: BitBucketServerPRActivity[]
/** The activities such as OPENING, CLOSING, MERGING or UPDATING a pull request */
activities: BitBucketServerPRActivity[]
```

0 comments on commit 327231d

Please sign in to comment.