Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Gepetto
dashboard
Commits
1b2d47d2
Commit
1b2d47d2
authored
Feb 09, 2018
by
Guilhem Saurel
Browse files
commits_since may fail
parent
d450e0a7
Changes
1
Hide whitespace changes
Inline
Side-by-side
rainboard/models.py
View file @
1b2d47d2
...
...
@@ -249,8 +249,11 @@ class Project(Links, NamedModel, TimeStampedModel):
self
.
save
()
def
commits_since
(
self
):
commits
=
self
.
git
().
git
.
rev_list
(
f
'v
{
self
.
version
}
..
{
self
.
main_branch
()
}
'
)
return
len
(
commits
.
split
(
'
\n
'
))
if
commits
else
0
try
:
commits
=
self
.
git
().
git
.
rev_list
(
f
'v
{
self
.
version
}
..
{
self
.
main_branch
()
}
'
)
return
len
(
commits
.
split
(
'
\n
'
))
if
commits
else
0
except
git
.
exc
.
GitCommandError
:
pass
def
open_issues
(
self
):
return
query_sum
(
self
.
repo_set
,
'open_issues'
)
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment