Skip to content

Commit b550a52

Browse files
authored
Merge pull request #576 from aserdobintsev/gitlab_merge_request_squash_attribute
GitLab squash attribute for merge request
2 parents 9094871 + d8b4559 commit b550a52

File tree

3 files changed

+5
-0
lines changed

3 files changed

+5
-0
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
- Resolve `// fileImport: ~` path to an absolute path on running `danger-swift edit` [@417-72KI][] - [#565](https://github.com/danger/swift/pull/565)
2020
- Add ability to change meta information [@Nikoloutsos][] - [#567](https://github.com/danger/swift/pull/567)
2121
- Add deactivated user status for GitLab [@antigp][] - [#572](https://github.com/danger/swift/pull/572)
22+
- Add `squash` attribute for GitLab merge request [@aserdobintsev][] - [#576](https://github.com/danger/swift/pull/576)
2223

2324
## 3.15.0
2425

@@ -556,3 +557,4 @@ This release also includes:
556557
[danger-swift-with-swiftlint]: https://github.com/orgs/danger/packages/container/package/danger-swift-with-swiftlint
557558
[@dahlborn]: https://github.com/dahlborn
558559
[@mxsc]: https://github.com/mxsc
560+
[@aserdobintsev]: https://github.com/aserdobintsev

Sources/Danger/GitLabDSL.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,7 @@ public extension GitLab {
193193
case shouldRemoveSourceBranch = "should_remove_source_branch"
194194
case sourceBranch = "source_branch"
195195
case sourceProjectId = "source_project_id"
196+
case squash
196197
case state
197198
case subscribed
198199
case targetBranch = "target_branch"
@@ -237,6 +238,7 @@ public extension GitLab {
237238
public let shouldRemoveSourceBranch: Bool?
238239
public let sourceBranch: String
239240
public let sourceProjectId: Int
241+
public let squash: Bool?
240242
public let state: State
241243
public let subscribed: Bool
242244
public let targetBranch: String

Tests/DangerTests/GitLabTests.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ final class GitLabTests: XCTestCase {
7878
XCTAssertNil(mergeRequest.shouldRemoveSourceBranch)
7979
XCTAssertEqual(mergeRequest.sourceBranch, "patch-2")
8080
XCTAssertEqual(mergeRequest.sourceProjectId, 10_132_593)
81+
XCTAssertEqual(mergeRequest.squash, false)
8182
XCTAssertEqual(mergeRequest.state, .merged)
8283
XCTAssertEqual(mergeRequest.subscribed, false)
8384
XCTAssertEqual(mergeRequest.targetBranch, "master")

0 commit comments

Comments
 (0)