FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Chore/ci disable py func by max-wittig · Pull Request #830 · python-gitlab/python-gitlab · GitHub

Repository navigation

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension .py  (1) .yml  (1) All 2 file types selected
Viewed files
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Unified
Split
Hide whitespace
Diff view
Unified
Split
Hide whitespace
2 changes: 1 addition & 1 deletion .travis.yml
This file contains hidden or 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
Expand Up @@ -4,7 +4,7 @@ services:
language: python
python: 2.7
env:
- TOX_ENV=py_func_v4
#- TOX_ENV=py_func_v4
- TOX_ENV=cli_func_v4
install:
- pip install tox
Expand Down
19 changes: 16 additions & 3 deletions gitlab/v4/objects.py
This file contains hidden or 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
Expand Up @@ -4262,10 +4262,18 @@ def transfer_project(self, to_namespace, **kwargs):
path, post_data={"namespace": to_namespace}, **kwargs
)


@cli.register_custom_action("Project", ("ref_name", "artifact_path", "job"))
@exc.on_http_error(exc.GitlabGetError)
def artifact(self, ref_name, artifact_path, job, streamed=False, action=None, chunk_size=1024, **kwargs):
def artifact(
self,
ref_name,
artifact_path,
job,
streamed=False,
action=None,
chunk_size=1024,
**kwargs
):
"""Download a single artifact file from a specific tag or branch from within the job’s artifacts archive.

Args:
Expand All @@ -4288,7 +4296,12 @@ def artifact(self, ref_name, artifact_path, job, streamed=False, action=None, ch
str: The artifacts if `streamed` is False, None otherwise.
"""

path = "/projects/%s/jobs/artifacts/%s/raw/%s?job=%s" % (self.get_id(), ref_name, artifact_path, job)
path = "/projects/%s/jobs/artifacts/%s/raw/%s?job=%s" % (
self.get_id(),
ref_name,
artifact_path,
job,
)
result = self.manager.gitlab.http_get(
path, streamed=streamed, raw=True, **kwargs
)
Expand Down

Back | FazBrowse Home | New Git URL