Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/iterative/cml into runner…
Browse files Browse the repository at this point in the history
…-no-special-cases
  • Loading branch information
DavidGOrtega committed Jun 10, 2022
2 parents 45b93f5 + 4668433 commit 9b0a217
Showing 1 changed file with 14 additions and 8 deletions.
22 changes: 14 additions & 8 deletions src/drivers/gitlab.js
Original file line number Diff line number Diff line change
Expand Up @@ -103,14 +103,20 @@ class Gitlab {
const endpoint = `/projects/${projectPath}/repository/commits/${commitSha}/merge_requests`;
const prs = await this.request({ endpoint, method: 'GET' });

return prs.map((pr) => {
const { web_url: url, source_branch: source, target_branch: target } = pr;
return {
url,
source,
target
};
});
return prs
.filter((pr) => pr.state === 'opened')
.map((pr) => {
const {
web_url: url,
source_branch: source,
target_branch: target
} = pr;
return {
url,
source,
target
};
});
}

async checkCreate() {
Expand Down

1 comment on commit 9b0a217

@github-actions

This comment was marked as duplicate.

Please sign in to comment.