Skip to content
This repository was archived by the owner on May 22, 2025. It is now read-only.

Commit fd61ebc

Browse files
committed
Add closed-at and merged-at fields
for issues and merge requests
1 parent e059f1f commit fd61ebc

File tree

3 files changed

+14
-2
lines changed

3 files changed

+14
-2
lines changed

documentation.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -399,7 +399,7 @@ gtt report --issue_columns=iid --issue_columns=title --issue_columns=time_userna
399399

400400
*Note: Available columns to choose from: `id`, `iid`, `title`, `project_id`,
401401
`project_namespace`, `description`, `labels`, `milestone`, `assignee`, `author`,
402-
`closed`, `updated_at`, `created_at`, `due_date`, `state`, `spent`, `total_spent`, `total_estimate`*
402+
`closed`, `updated_at`, `created_at`, `closed_at`, `due_date`, `state`, `spent`, `total_spent`, `total_estimate`*
403403

404404
*You can also include columns that show the total time spent by a specific user
405405
by following this convention: `time_username`*
@@ -412,7 +412,7 @@ gtt report --merge_request_columns=iid --merge_request_columns=title --merge_req
412412

413413
*Note: Available columns to choose from: `id`, `iid`, `title`, `project_id`,
414414
`project_namespace`, `description`, `labels`, `milestone`, `assignee`, `author`,
415-
`updated_at`, `created_at`, `state`, `spent`, `total_spent`, `total_estimate`*
415+
`updated_at`, `created_at`, `closed_at`, `merged_at`, `state`, `spent`, `total_spent`, `total_estimate`*
416416

417417
*You can also include columns that show the total time spent by a specific user
418418
by following this convention: `time_username`*

src/models/issue.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,10 @@ class issue extends hasTimes {
9494
return this.data.due_date ? moment(this.data.due_date): null;
9595
}
9696

97+
get closed_at() {
98+
return this.data.closed_at ? moment(this.data.closed_at): null;
99+
}
100+
97101
get total_spent() {
98102
return this.stats ? this.config.toHumanReadable(this.stats.total_time_spent, this._type) : null;
99103
}

src/models/mergeRequest.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,14 @@ class mergeRequest extends hasTimes {
7575
return moment(this.data.created_at);
7676
}
7777

78+
get merged_at() {
79+
return this.data.merged_at ? moment(this.data.merged_at): null;
80+
}
81+
82+
get closed_at() {
83+
return this.data.closed_at ? moment(this.data.closed_at): "not closed"
84+
}
85+
7886
get state() {
7987
return this.data.state;
8088
}

0 commit comments

Comments
 (0)