Skip to content

Commit

Permalink
Remove merge status recheck (#18)
Browse files Browse the repository at this point in the history
* remove merge status recheck

* cast array of messages to send to slack
  • Loading branch information
KirIgor authored Jun 6, 2024
1 parent 6b75ea2 commit 5f9660b
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 8 deletions.
3 changes: 1 addition & 2 deletions api/GitLab.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,13 @@ class GitLab {

project = id => this.__get(this.__getUrl("projects", id))

requests = (project, { withMergeStatusRecheck }) => {
requests = project => {
const query = {
sort: "asc",
per_page: 100,
state: "opened",
scope: "all",
wip: "no",
with_merge_status_recheck: withMergeStatusRecheck,
}

const uri = this.__getUrl("projects", project, "merge_requests")
Expand Down
6 changes: 3 additions & 3 deletions api/Messenger.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ class Messenger {
}

sendMany = messages => {
_.castArray(messages).forEach((message, idx) => {
_.delay(() => this.send(message), 100 * idx)
})
return _.castArray(messages).reduce((promise, message) => {
return promise.then(() => this.send(message))
}, Promise.resolve())
}
}

Expand Down
4 changes: 1 addition & 3 deletions tasks/Unapproved.js
Original file line number Diff line number Diff line change
Expand Up @@ -175,12 +175,10 @@ class Unapproved extends BaseCommand {
}

__getExtendedRequests = projectId => {
const checkConflicts = this.__getConfigSetting("unapproved.checkConflicts", false)

return this.gitlab
.project(projectId)
.then(project => this.gitlab
.requests(project.id, { withMergeStatusRecheck: checkConflicts })
.requests(project.id)
.then(requests => {
const promises = requests.map(request => this.__getExtendedRequest(project, request))
return Promise.all(promises)
Expand Down

0 comments on commit 5f9660b

Please sign in to comment.