generated from obsidianmd/obsidian-sample-plugin
-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Added settings for group level, and project level. Added option for purgingIssues everytime, or not. Fix gitlab PAT reloading plugin. Fix gitlab icon. * Options for Refresh Time, and onStartup Pull, refactors to not show groupid and project id in on personal, also updates issues to include entire response from gitlab api. * Fixes linter Issues * added a few tests --------- Co-authored-by: Jonathan Deates <[email protected]>
- Loading branch information
1 parent
af0600a
commit 98dbfbc
Showing
8 changed files
with
324 additions
and
70 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,53 @@ | ||
import { sanitizeFileName } from './util'; | ||
import {sanitizeFileName} from './util'; | ||
import {Assignee, Epic, Issue, ObsidianIssue, References, ShortIssue, TimeStats} from "./types"; | ||
|
||
export interface Issue { | ||
readonly id: number; | ||
readonly title: string; | ||
readonly description: string; | ||
readonly due_date: string; | ||
readonly web_url: string; | ||
readonly references: string; | ||
readonly filename: string; | ||
} | ||
|
||
export class GitlabIssue implements Issue { | ||
export class GitlabIssue implements ObsidianIssue { | ||
|
||
id: number; | ||
title: string; | ||
description: string; | ||
due_date: string; | ||
web_url: string; | ||
references: string; | ||
references: string | References; | ||
|
||
get filename() { | ||
return sanitizeFileName(this.title); | ||
} | ||
|
||
constructor(issue: Issue) { | ||
this.id = issue.id; | ||
this.title = issue.title; | ||
this.description = issue.description; | ||
this.due_date = issue.due_date; | ||
this.web_url = issue.web_url; | ||
this.references = issue.references; | ||
Object.assign(this, issue); | ||
} | ||
|
||
_links: { | ||
self: string; | ||
notes: string; | ||
award_emoji: string; | ||
project: string; | ||
closed_as_duplicate_of: string | ||
}; | ||
assignees: Assignee[]; | ||
author: Assignee; | ||
closed_by: Assignee; | ||
confidential: boolean; | ||
created_at: string; | ||
discussion_locked: boolean; | ||
downvotes: number; | ||
epic: Epic; | ||
has_tasks: boolean; | ||
iid: number; | ||
imported: boolean; | ||
imported_from: string; | ||
issue_type: string; | ||
labels: string[]; | ||
merge_requests_count: number; | ||
milestone: ShortIssue; | ||
project_id: number; | ||
severity: string; | ||
state: string; | ||
task_completion_status: { count: number; completed_count: number }; | ||
task_status: string; | ||
time_stats: TimeStats; | ||
updated_at: string; | ||
upvotes: number; | ||
user_notes_count: number; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.