Skip to content

Commit

Permalink
Merge branch 'master' into 793-review-typing
Browse files Browse the repository at this point in the history
  • Loading branch information
jdalrymple authored Jun 26, 2020
2 parents 90139a0 + 61798eb commit 4fee152
Show file tree
Hide file tree
Showing 13 changed files with 154 additions and 78 deletions.
10 changes: 10 additions & 0 deletions .all-contributorsrc
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,16 @@
"contributions": [
"code"
]
},
{
"login": "fbridault",
"name": "Flavien Bridault",
"avatar_url": "https://avatars0.githubusercontent.com/u/8638653?v=4",
"profile": "http://www.ircad.fr/",
"contributions": [
"test",
"code"
]
}
],
"contributorsPerLine": 7
Expand Down
25 changes: 25 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,28 @@
# 22.0.1 (Thu Jun 25 2020)

:tada: This release contains work from a new contributor! :tada:

Thank you, Flavien Bridault ([@fbridault](https://github.com/fbridault)), for all your work!

#### 🐛 Bug Fix

- `@gitbeaker/core`
- Add `related merge requests` and `closed by` in Issues service [#903](https://github.com/jdalrymple/gitbeaker/pull/903) ([@fbridault](https://github.com/fbridault) [@jdalrymple](https://github.com/jdalrymple))

#### 🔩 Dependency Updates

- chore(deps-dev): bump lint-staged from 10.2.10 to 10.2.11 [#899](https://github.com/jdalrymple/gitbeaker/pull/899) ([@dependabot-preview[bot]](https://github.com/dependabot-preview[bot]))
- chore(deps-dev): bump rollup from 2.16.1 to 2.18.0 [#905](https://github.com/jdalrymple/gitbeaker/pull/905) ([@dependabot-preview[bot]](https://github.com/dependabot-preview[bot]))
- chore(deps-dev): bump eslint-plugin-jest from 23.13.2 to 23.16.0 [#906](https://github.com/jdalrymple/gitbeaker/pull/906) ([@dependabot-preview[bot]](https://github.com/dependabot-preview[bot]))

#### Authors: 3

- [@dependabot-preview[bot]](https://github.com/dependabot-preview[bot])
- Flavien Bridault ([@fbridault](https://github.com/fbridault))
- Justin Dalrymple ([@jdalrymple](https://github.com/jdalrymple))

---

# 22.0.0 (Sat Jun 20 2020)

#### 💥 Breaking Change
Expand Down
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -660,11 +660,13 @@ This started as a fork from [node-gitlab-legacy](https://github.com/node-gitlab/
<td align="center"><a href="https://about.me/mickaeltr"><img src="https://avatars2.githubusercontent.com/u/378910?v=4" width="50px;" alt=""/><br /><sub><b>Mickaël Tricot</b></sub></a><br /><a href="https://github.com/jdalrymple/gitbeaker/commits?author=mickaeltr" title="Documentation">📖</a></td>
<td align="center"><a href="https://github.com/andreasciamanna"><img src="https://avatars0.githubusercontent.com/u/181780?v=4" width="50px;" alt=""/><br /><sub><b>Andrea</b></sub></a><br /><a href="https://github.com/jdalrymple/gitbeaker/commits?author=andreasciamanna" title="Code">💻</a></td>
</tr>
<tr>
<td align="center"><a href="http://www.ircad.fr/"><img src="https://avatars0.githubusercontent.com/u/8638653?v=4" width="50px;" alt=""/><br /><sub><b>Flavien Bridault</b></sub></a><br /><a href="https://github.com/jdalrymple/gitbeaker/commits?author=fbridault" title="Tests">⚠️</a> <a href="https://github.com/jdalrymple/gitbeaker/commits?author=fbridault" title="Code">💻</a></td>
</tr>
</table>

<!-- markdownlint-enable -->
<!-- prettier-ignore-end -->

<!-- ALL-CONTRIBUTORS-LIST:END -->

- [Dylan DesRosier](https://github.com/ddesrosier)
Expand Down
2 changes: 1 addition & 1 deletion lerna.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
],
"npmClient": "yarn",
"useWorkspaces": true,
"version": "22.0.0",
"version": "22.0.1",
"tagVersionPrefix": ""
}
6 changes: 3 additions & 3 deletions packages/gitbeaker-browser/package.json
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
{
"name": "@gitbeaker/browser",
"description": "Full Browser implementation of the GitLab API. Supports Promises, Async/Await.",
"version": "22.0.0",
"version": "22.0.1",
"author": {
"name": "Justin Dalrymple"
},
"bugs": {
"url": "https://github.com/jdalrymple/gitbeaker/issues"
},
"dependencies": {
"@gitbeaker/core": "^22.0.0",
"@gitbeaker/requester-utils": "^22.0.0",
"@gitbeaker/core": "^22.0.1",
"@gitbeaker/requester-utils": "^22.0.1",
"ky": "^0.20.0"
},
"devDependencies": {
Expand Down
6 changes: 3 additions & 3 deletions packages/gitbeaker-cli/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@gitbeaker/cli",
"description": "Full NodeJS CLI implementation of the GitLab API.",
"version": "22.0.0",
"version": "22.0.1",
"author": {
"name": "Justin Dalrymple"
},
Expand All @@ -12,8 +12,8 @@
"url": "https://github.com/jdalrymple/gitbeaker/issues"
},
"dependencies": {
"@gitbeaker/core": "^22.0.0",
"@gitbeaker/node": "^22.0.0",
"@gitbeaker/core": "^22.0.1",
"@gitbeaker/node": "^22.0.1",
"chalk": "^4.0.0",
"ora": "^4.0.4",
"sywac": "^1.3.0",
Expand Down
17 changes: 17 additions & 0 deletions packages/gitbeaker-core/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
# v22.0.1 (Thu Jun 25 2020)

:tada: This release contains work from a new contributor! :tada:

Thank you, Flavien Bridault ([@fbridault](https://github.com/fbridault)), for all your work!

#### 🐛 Bug Fix

- Add `related merge requests` and `closed by` in Issues service [#903](https://github.com/jdalrymple/gitbeaker/pull/903) ([@fbridault](https://github.com/fbridault) [@jdalrymple](https://github.com/jdalrymple))

#### Authors: 2

- Flavien Bridault ([@fbridault](https://github.com/fbridault))
- Justin Dalrymple ([@jdalrymple](https://github.com/jdalrymple))

---

# v22.0.0 (Sat Jun 20 2020)

#### 💥 Breaking Change
Expand Down
4 changes: 2 additions & 2 deletions packages/gitbeaker-core/package.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
{
"name": "@gitbeaker/core",
"description": "Core API implementation of the GitLab API. Supports Promises, Async/Await.",
"version": "22.0.0",
"version": "22.0.1",
"author": {
"name": "Justin Dalrymple"
},
"bugs": {
"url": "https://github.com/jdalrymple/gitbeaker/issues"
},
"dependencies": {
"@gitbeaker/requester-utils": "^22.0.0",
"@gitbeaker/requester-utils": "^22.0.1",
"form-data": "^3.0.0",
"li": "^1.3.0",
"xcase": "^2.0.1"
Expand Down
82 changes: 47 additions & 35 deletions packages/gitbeaker-core/src/services/Issues.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,17 @@ import {
type ProjectOrGroup = { projectId: string | number } | { groupId: string | number } | {};

export class Issues extends BaseService {
addSpentTime(projectId: string | number, issueId: number, duration: string, options?: Sudo) {
const [pId, iId] = [projectId, issueId].map(encodeURIComponent);
addSpentTime(projectId: string | number, issueIid: number, duration: string, options?: Sudo) {
const [pId, iId] = [projectId, issueIid].map(encodeURIComponent);

return RequestHelper.post(this, `projects/${pId}/issues/${iId}/add_spent_time`, {
duration,
...options,
});
}

addTimeEstimate(projectId: string | number, issueId: number, duration: string, options?: Sudo) {
const [pId, iId] = [projectId, issueId].map(encodeURIComponent);
addTimeEstimate(projectId: string | number, issueIid: number, duration: string, options?: Sudo) {
const [pId, iId] = [projectId, issueIid].map(encodeURIComponent);

return RequestHelper.post(this, `projects/${pId}/issues/${iId}/time_estimate`, {
duration,
Expand Down Expand Up @@ -47,92 +47,104 @@ export class Issues extends BaseService {
return RequestHelper.post(this, `projects/${pId}/issues`, options);
}

edit(projectId: string | number, issueId: number, options?: BaseRequestOptions) {
const [pId, iId] = [projectId, issueId].map(encodeURIComponent);
closedBy(projectId: string | number, issueIid: number, options?: BaseRequestOptions) {
const [pId, iId] = [projectId, issueIid].map(encodeURIComponent);

return RequestHelper.put(this, `projects/${pId}/issues/${iId}`, options);
return RequestHelper.get(this, `projects/${pId}/issues/${iId}/closed_by`, options);
}

links(projectId: string | number, issueIId: number) {
const [pId, iId] = [projectId, issueIId].map(encodeURIComponent);
edit(projectId: string | number, issueIid: number, options?: BaseRequestOptions) {
const [pId, iId] = [projectId, issueIid].map(encodeURIComponent);

return RequestHelper.get(this, `projects/${pId}/issues/${iId}/links`);
return RequestHelper.put(this, `projects/${pId}/issues/${iId}`, options);
}

link(
projectId: string | number,
issueIid: number,
targetProjectId: string | number,
targetIssueId: number,
targetIssueIid: number,
options?: BaseRequestOptions,
) {
const [pId, iId] = [projectId, issueIid].map(encodeURIComponent);
const [targetpId, targetIid] = [targetProjectId, targetIssueId].map(encodeURIComponent);
const [targetpId, targetIid] = [targetProjectId, targetIssueIid].map(encodeURIComponent);

return RequestHelper.post(this, `projects/${pId}/issues/${iId}/links`, {
targetProjectId: targetpId,
targetIssueId: targetIid,
targetIssueIid: targetIid,
...options,
});
}

links(projectId: string | number, issueIid: number) {
const [pId, iId] = [projectId, issueIid].map(encodeURIComponent);

return RequestHelper.get(this, `projects/${pId}/issues/${iId}/links`);
}

participants(projectId: string | number, issueIid: number, options?: Sudo) {
const [pId, iId] = [projectId, issueIid].map(encodeURIComponent);

return RequestHelper.get(this, `projects/${pId}/issues/${iId}/participants`, options);
}

relatedMergeRequests(projectId: string | number, issueIid: number, options?: BaseRequestOptions) {
const [pId, iId] = [projectId, issueIid].map(encodeURIComponent);

return RequestHelper.get(this, `projects/${pId}/issues/${iId}/related_merge_requests`, options);
}

removeLink(
projectId: string | number,
issueIId: number,
issueIid: number,
issueLinkId: string | number,
options?: BaseRequestOptions,
) {
const [pId, iId, iLinkId] = [projectId, issueIId, issueLinkId].map(encodeURIComponent);
const [pId, iId, iLinkId] = [projectId, issueIid, issueLinkId].map(encodeURIComponent);

return RequestHelper.del(this, `projects/${pId}/issues/${iId}/links/${iLinkId}`, {
...options,
});
}

participants(projectId: string | number, issueId: number, options?: Sudo) {
const [pId, iId] = [projectId, issueId].map(encodeURIComponent);

return RequestHelper.get(this, `projects/${pId}/issues/${iId}/participants`, options);
}

remove(projectId: string | number, issueId: number, options?: Sudo) {
const [pId, iId] = [projectId, issueId].map(encodeURIComponent);
remove(projectId: string | number, issueIid: number, options?: Sudo) {
const [pId, iId] = [projectId, issueIid].map(encodeURIComponent);

return RequestHelper.del(this, `projects/${pId}/issues/${iId}`, options);
}

resetSpentTime(projectId: string | number, issueId: number, options?: BaseRequestOptions) {
const [pId, iId] = [projectId, issueId].map(encodeURIComponent);
resetSpentTime(projectId: string | number, issueIid: number, options?: BaseRequestOptions) {
const [pId, iId] = [projectId, issueIid].map(encodeURIComponent);

return RequestHelper.post(this, `projects/${pId}/issues/${iId}/reset_spent_time`, options);
}

resetTimeEstimate(projectId: string | number, issueId: number, options?: Sudo) {
const [pId, iId] = [projectId, issueId].map(encodeURIComponent);
resetTimeEstimate(projectId: string | number, issueIid: number, options?: Sudo) {
const [pId, iId] = [projectId, issueIid].map(encodeURIComponent);

return RequestHelper.post(this, `projects/${pId}/issues/${iId}/reset_time_estimate`, options);
}

show(projectId: string | number, issueId: number, options?: Sudo) {
const [pId, iId] = [projectId, issueId].map(encodeURIComponent);
show(projectId: string | number, issueIid: number, options?: Sudo) {
const [pId, iId] = [projectId, issueIid].map(encodeURIComponent);

return RequestHelper.get(this, `projects/${pId}/issues/${iId}`, options);
}

subscribe(projectId: string | number, issueId: number, options?: Sudo) {
const [pId, iId] = [projectId, issueId].map(encodeURIComponent);
subscribe(projectId: string | number, issueIid: number, options?: Sudo) {
const [pId, iId] = [projectId, issueIid].map(encodeURIComponent);

return RequestHelper.post(this, `projects/${pId}/issues/${iId}/subscribe`, options);
}

timeStats(projectId: string | number, issueId: number, options?: Sudo) {
const [pId, iId] = [projectId, issueId].map(encodeURIComponent);
timeStats(projectId: string | number, issueIid: number, options?: Sudo) {
const [pId, iId] = [projectId, issueIid].map(encodeURIComponent);

return RequestHelper.get(this, `projects/${pId}/issues/${iId}/time_stats`, options);
}

unsubscribe(projectId: string | number, issueId: number, options?: Sudo) {
const [pId, iId] = [projectId, issueId].map(encodeURIComponent);
unsubscribe(projectId: string | number, issueIid: number, options?: Sudo) {
const [pId, iId] = [projectId, issueIid].map(encodeURIComponent);

return RequestHelper.del(this, `projects/${pId}/issues/${iId}/unsubscribe`, options);
}
Expand Down
2 changes: 1 addition & 1 deletion packages/gitbeaker-core/test/unit/services/Issues.ts
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ describe.skip('Issues.link', () => {

expect(RequestHelper.post).toHaveBeenCalledWith(service, 'projects/8/issues/3/links', {
targetProjectId: 4,
targetIssueId: 5,
targetIssueIid: 5,
});
});
});
Expand Down
6 changes: 3 additions & 3 deletions packages/gitbeaker-node/package.json
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
{
"name": "@gitbeaker/node",
"description": "Full NodeJS implementation of the GitLab API. Supports Promises, Async/Await.",
"version": "22.0.0",
"version": "22.0.1",
"author": {
"name": "Justin Dalrymple"
},
"bugs": {
"url": "https://github.com/jdalrymple/gitbeaker/issues"
},
"dependencies": {
"@gitbeaker/core": "^22.0.0",
"@gitbeaker/requester-utils": "^22.0.0",
"@gitbeaker/core": "^22.0.1",
"@gitbeaker/requester-utils": "^22.0.1",
"form-data": "^3.0.0",
"got": "^11.1.4",
"xcase": "^2.0.1"
Expand Down
2 changes: 1 addition & 1 deletion packages/gitbeaker-requester-utils/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@gitbeaker/requester-utils",
"description": "Utility functions for requester implementatons used in @gitbeaker",
"version": "22.0.0",
"version": "22.0.1",
"author": {
"name": "Justin Dalrymple"
},
Expand Down
Loading

0 comments on commit 4fee152

Please sign in to comment.