Skip to content

Commit

Permalink
Improved gitlab documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
Son Luong Ngoc committed Dec 7, 2019
1 parent dc2a773 commit d1e8254
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
6 changes: 3 additions & 3 deletions docs/usage/gitlab.html.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Then in your Dangerfiles you will have a fully fleshed out `danger.gitlab` objec
```ts
import { danger, warn } from "danger"

if (danger.bitbucket_cloud.mr.title.includes("WIP")) {
if (danger.gitlab.mr.title.includes("WIP")) {
warn("PR is considered WIP")
}
```
Expand All @@ -29,7 +29,7 @@ danger.gitlab.
/** The pull request and repository metadata */
metadata: RepoMetaData
/** The Merge Request metadata */
mr: BitBucketCloudPRDSL
mr: GitLabMR
/** The commits associated with the merge request */
commits: BitBucketCloudCommit[]
commits: GitLabMRCommit[]
```
4 changes: 4 additions & 0 deletions source/ci_source/providers/GitLabCI.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ export class GitLabCI implements CISource {
get repoSlug(): string {
return this.env.CI_PROJECT_PATH
}

get commitHash(): string {
return this.env.CI_COMMIT_SHA
}
}

// See https://docs.gitlab.com/ee/ci/variables/predefined_variables.html

0 comments on commit d1e8254

Please sign in to comment.