Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
scripts
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
CSCE 361
scripts
Commits
1d9a3ded
Commit
1d9a3ded
authored
Jul 30, 2020
by
Christopher Bohn
Browse files
Options
Downloads
Patches
Plain Diff
Replaced GitlabIssue.get_state() with is_open() & is_closed()
parent
7bb51fc6
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
api/gitlab_classes.py
+15
-1
15 additions, 1 deletion
api/gitlab_classes.py
with
15 additions
and
1 deletion
api/gitlab_classes.py
+
15
−
1
View file @
1d9a3ded
from
datetime
import
datetime
,
date
from
datetime
import
datetime
,
date
from
deprecated
import
deprecated
from
functools
import
reduce
from
functools
import
reduce
from
typing
import
ClassVar
,
Dict
,
Iterable
,
List
,
Optional
,
Set
,
Union
from
typing
import
ClassVar
,
Dict
,
Iterable
,
List
,
Optional
,
Set
,
Union
...
@@ -110,12 +111,25 @@ class GitlabIssue:
...
@@ -110,12 +111,25 @@ class GitlabIssue:
"""
"""
return
self
.
git_issue
.
description
return
self
.
git_issue
.
description
def
get_state
(
self
)
->
str
:
# TODO, deprecate and replace with is_opened & is_closed
@deprecated
def
get_state
(
self
)
->
str
:
# TODO, delete after we're sure there are no uses
"""
"""
:return: opened or closed
:return: opened or closed
"""
"""
return
self
.
git_issue
.
state
return
self
.
git_issue
.
state
def
is_open
(
self
)
->
bool
:
"""
:return: True if the issue is open; False if the issue is closed
"""
return
self
.
git_issue
.
state
==
'
opened
'
def
is_closed
(
self
)
->
bool
:
"""
:return: True if the issue is closed; False if the issue is open
"""
return
self
.
git_issue
.
state
==
'
closed
'
def
get_created_at
(
self
)
->
datetime
:
def
get_created_at
(
self
)
->
datetime
:
"""
"""
:return: an
"
aware
"
datetime object representing the creation date/time
:return: an
"
aware
"
datetime object representing the creation date/time
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment