Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
bob.devtools
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
bob
bob.devtools
Commits
bbd7481f
Commit
bbd7481f
authored
2 years ago
by
Yannick DAYER
Browse files
Options
Downloads
Patches
Plain Diff
[gitlab] Remove UserWarning for tags.list() method
parent
65e8d10f
No related branches found
No related tags found
1 merge request
!304
Fix the gitlab warning about list returning partial results
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
bob/devtools/changelog.py
+4
-4
4 additions, 4 deletions
bob/devtools/changelog.py
bob/devtools/release.py
+3
-3
3 additions, 3 deletions
bob/devtools/release.py
with
7 additions
and
7 deletions
bob/devtools/changelog.py
+
4
−
4
View file @
bbd7481f
...
...
@@ -60,7 +60,7 @@ def get_last_tag(package):
# according to the Gitlab API documentation, tags are sorted from the last
# updated to the first, by default - no need to do further sorting!
tag_list
=
package
.
tags
.
list
()
tag_list
=
package
.
tags
.
list
(
page
=
1
,
per_page
=
1
)
# Silence userWarning on
list()
if
tag_list
:
# there are tags, use these
...
...
@@ -86,7 +86,7 @@ def get_last_tag_date(package):
# according to the Gitlab API documentation, tags are sorted from the last
# updated to the first, by default - no need to do further sorting!
tag_list
=
package
.
tags
.
list
()
tag_list
=
package
.
tags
.
list
(
page
=
1
,
per_page
=
1
)
# Silence userWarning on
list()
if
tag_list
:
# there are tags, use these
...
...
@@ -235,7 +235,7 @@ def get_changes_since(gitpkg, since):
Parameters
----------
gitpkg : object
A gitlab pa
k
cage object
A gitlab pac
k
age object
since : object
A parsed date
...
...
@@ -245,7 +245,7 @@ def get_changes_since(gitpkg, since):
mrs, tags, commits
"""
# get tags since release and sort them
tags
=
gitpkg
.
tags
.
list
()
tags
=
gitpkg
.
tags
.
list
(
all
=
True
)
# sort tags by date
tags
=
[
k
for
k
in
tags
if
parse_date
(
k
.
commit
[
"
committed_date
"
])
>=
since
]
...
...
This diff is collapsed.
Click to expand it.
bob/devtools/release.py
+
3
−
3
View file @
bbd7481f
...
...
@@ -21,7 +21,7 @@ def download_path(package, path, output=None, ref="master"):
"""
Downloads paths from gitlab, with an optional recurse.
This method will download an archive of the repository from chosen
reference, and then it will search insi
z
e the zip blob for the path to be
reference, and then it will search insi
d
e the zip blob for the path to be
copied into output. It uses :py:class:`zipfile.ZipFile` to do this search.
This method will not be very efficient for larger repository references,
but works recursively by default.
...
...
@@ -277,7 +277,7 @@ def update_files_with_mr(
files_dict: Dictionary of file names and their contents (as text)
message: Commit message
branch: The branch name to use for the merge request
automerge: If we should set the
"
merge if build suceeds
"
flag on the
automerge: If we should set the
"
merge if build suc
c
eeds
"
flag on the
created MR
dry_run: If True, nothing will be pushed to gitlab
user_id: The integer which numbers the user to attribute this MR to
...
...
@@ -384,7 +384,7 @@ def get_last_pipeline(gitpkg):
gitpkg: gitlab package object
Returns: The g
t
ilab object of the pipeline
Returns: The gi
t
lab object of the pipeline
"""
# wait for 10 seconds to ensure that if a pipeline was just submitted,
...
...
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