Skip to content

Commit b51d296

Browse files
authored
Merge branch 'master' into master
2 parents 53f7de7 + 52d7631 commit b51d296

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+903
-252
lines changed

.dockerignore

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
venv/
2+
dist/
3+
build/
4+
*.egg-info
5+
.github/

.travis.yml

+9
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,12 @@ install:
2121
- pip install tox
2222
script:
2323
- tox -e $TOX_ENV
24+
25+
deploy:
26+
provider: pypi
27+
user: max-wittig
28+
password:
29+
secure: LmNkZdbNe1oBSJ/PeTCKXaeu9Ml/biY4ZN4aedbD4lLXbxV/sgsHEE4N1Xrg2D/CJsnNjBY7CHzO0vL5iak8IRpV61xkdquZHvAUQKuhjMY30HopReAEw8sP+Wpf3lYcD1BjC5KT9vqWG99feoQ6epRt//Xm4DdkBYNmmUsCsMBTZLlGnj3B/mE8w+XQxQpdA2QzpRJ549N12vidwZRKqP0Zuug3rELVSo64O2bpqarKx/EeUUhTXZ0Y4XeVYgvuHBjvPqtuSJzR17CNkjaBhacD7EFTP34sAaCKGRDpfYiiiGx9LeKOEAv5Hj0+LOqEC/o6EyiIFviE+HvLQ/kBLJ6Oo2p47fibyIU/YOAFdZYKmBRq2ZUaV0DhhuuCRPZ+yLrsuaFRrKTVEMsHVtdsXJkW5gKG08vwOndW+kamppRhkAcdFVyokIgu/6nPBRWMuS6ue2aKoKRdP2gmqk0daKM1ao2uv06A2/J1/xkPy1EX5MjyK8Mh78ooKjITp5DHYn8l1pxaB0YcEkRzfwMyLErGQaRDgo7rCOm0tTRNhArkn0VE1/KLKFbATo2NSxZDwUJQ5TBNCEqfdBN1VzNEduJ7ajbZpq3DsBRM/9hzQ5LLxn7azMl9m+WmT12Qcgz25wg2Sgbs9Z2rT6fto5h8GSLpy8ReHo+S6fALJBzA4pg=
30+
distributions: sdist bdist_wheel
31+
on:
32+
tags: true

AUTHORS

+6-96
Original file line numberDiff line numberDiff line change
@@ -1,100 +1,10 @@
1-
Authors
2-
-------
1+
Authors / Maintainers
2+
---------------------
33

4-
Gauvain Pocentek <gauvain@pocentek.net>
5-
Mika Mäenpää <mika.j.maenpaa@tut.fi>
4+
Gauvain Pocentek <gauvainpocentek@gmail.com>
5+
Max Wittig <max.wittig@siemens.com>
66

77
Contributors
88
------------
9-
Adam Reid <areid@navtech.aero>
10-
Alexander Skiba <mail@ghostlyrics.net>
11-
Alex Widener <alexwidener@users.noreply.github.com>
12-
Amar Sood (tekacs) <mail@tekacs.com>
13-
Andjelko Horvat <ahorvat@reflected.net>
14-
Andreas Nüßlein <nutz@noova.de>
15-
Andrew Austin <aaustin@terremark.com>
16-
Armin Weihbold <armin.weihbold@gmail.com>
17-
Aron Pammer <info@aronpammer.me>
18-
Asher256 <Asher256@users.noreply.github.com>
19-
Bancarel Valentin <bancarel.valentin@gmail.com>
20-
Ben Brown <ben.brown@codethink.co.uk>
21-
Carlo Mion <mion00@users.noreply.github.com>
22-
Carlos Soriano <csoriano@gnome.org>
23-
Christian <cgumpert@users.noreply.github.com>
24-
Christian Wenk <christian.wenk@omicronenergy.com>
25-
Colin D Bennett <colin.bennett@harman.com>
26-
Cosimo Lupo <cosimo.lupo@daltonmaag.com>
27-
Crestez Dan Leonard <lcrestez@ixiacom.com>
28-
Cyril Jouve <jv.cyril@gmail.com>
29-
Daniel Kimsey <dekimsey@ufl.edu>
30-
derek-austin <derek.austin35@mailinator.com>
31-
Diego Giovane Pasqualin <dpasqualin@c3sl.ufpr.br>
32-
Dmytro Litvinov <litvinov.do.it@gmail.com>
33-
Eli Sarver <eli.sarver@gmail.com>
34-
Eric L Frederich <eric.frederich@siemens.com>
35-
Eric Sabouraud <esabouraud@users.noreply.github.com>
36-
Erik Weatherwax <erik.weatherwax@xls.xerox.com>
37-
fgouteroux <francois.gouteroux@d2-si.eu>
38-
Greg Allen <GregoryEAllen@users.noreply.github.com>
39-
Guillaume Delacour <gui@iroqwa.org>
40-
Guyzmo <guyzmo+github+pub@m0g.net>
41-
hakkeroid <hakkeroid@users.noreply.github.com>
42-
Ian Sparks <isparks@mdsol.com>
43-
itxaka <itxakaserrano@gmail.com>
44-
Ivica Arsov <ivica.arsov@sculpteo.com>
45-
Jakub Wilk <jwilk@jwilk.net>
46-
James (d0c_s4vage) Johnson <james.johnson@exodusintel.com>
47-
James E. Flemer <james.flemer@ndpgroup.com>
48-
James Johnson <d0c.s4vage@gmail.com>
49-
Jamie Bliss <astronouth7303@gmail.com>
50-
Jason Antman <jason@jasonantman.com>
51-
Jerome Robert <jeromerobert@gmx.com>
52-
Johan Brandhorst <johan@cognitivelogic.com>
53-
Jonathon Reinhart <Jonathon.Reinhart@gmail.com>
54-
Jon Banafato <jon@jonafato.com>
55-
Keith Wansbrough <keithw@lochan.org>
56-
Koen Smets <koen.smets@gmail.com>
57-
Kris Gambirazzi <Kris@sitehost.co.nz>
58-
leon <yuanliangliu@gmail.com>
59-
Lyudmil Nenov <lyudmil.nenov@gmail.com>
60-
Mart Sõmermaa <mart.somermaa@cgi.com>
61-
massimone88 <stefano.mandruzzato@gmail.com>
62-
Matej Zerovnik <matej@zunaj.si>
63-
Matt Odden <locke105@gmail.com>
64-
Matus Ferech <matus.ferech@telekom.com>
65-
Maura Hausman <mhausman@wayfair.com>
66-
Maxime Guyot <maxime.guyot@elits.com>
67-
Max Wittig <max.wittig@siemens.com>
68-
Michael Overmeyer <m.overmeyer@yahoo.ca>
69-
Michal Galet <michal.galet@gmail.com>
70-
Mike Kobit <mkobit@gmail.com>
71-
Mikhail Lopotkov <ms.lopotkov@tensor.ru>
72-
Miouge1 <Miouge1@users.noreply.github.com>
73-
Missionrulz <missionrulz@gmail.com>
74-
Mond WAN <mondwan@users.noreply.github.com>
75-
Moritz Lipp <github@mlq.me>
76-
Nathan Giesbrecht <NathanGiesbrecht@users.noreply.github.com>
77-
Nathan Schmidt <nathan@cascade-softworks.com>
78-
pa4373 <pa4373@gmail.com>
79-
Patrick Miller <patrick@velocitywebworks.com>
80-
Pavel Savchenko <asfaltboy@gmail.com>
81-
Peng Xiao <xiaoquwl@gmail.com>
82-
Pete Browne <pete.browne@localmed.com>
83-
Peter Mosmans <support@go-forward.net>
84-
P. F. Chimento <philip.chimento@gmail.com>
85-
Philipp Busch <philipp.busch@momox.biz>
86-
Pierre Tardy <tardyp@gmail.com>
87-
Rafael Eyng <rafaeleyng@gmail.com>
88-
Richard Hansen <rhansen@rhansen.org>
89-
Robert Lu <robberphex@gmail.com>
90-
samcday <sam.c.day@gmail.com>
91-
savenger <github@smahmood.de>
92-
Stefan Crain <stefancrain@users.noreply.github.com>
93-
Stefan K. Dunkler <stefan.dun@gmail.com>
94-
Stefan Klug <klug.stefan@gmx.de>
95-
Stefano Mandruzzato <stefano.mandruzzato@gmail.com>
96-
THEBAULT Julien <julien@thebault.co>
97-
Tim Neumann <mail@timnn.me>
98-
Twan <tmeynen@inuits.eu>
99-
Will Starms <vilhelmen@gmail.com>
100-
Yosi Zelensky <yosyos04@gmail.com>
9+
10+
See ``git log`` for a full list of contributors.

ChangeLog.rst

+45-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,48 @@
11
ChangeLog
22
=========
33

4+
Version 1.7.0_ - 2018-12-09
5+
---------------------------
6+
7+
* [docs] Fix the owned/starred usage documentation
8+
* [docs] Add a warning about http to https redirects
9+
* Fix the https redirection test
10+
* [docs] Add a note about GroupProject limited API
11+
* Add missing comma in ProjectIssueManager _create_attrs
12+
* More flexible docker image
13+
* Add project protected tags management
14+
* [cli] Print help and usage without config file
15+
* Rename MASTER_ACCESS to MAINTAINER_ACCESS
16+
* [docs] Add docs build information
17+
* Use docker image with current sources
18+
* [docs] Add PyYAML requirement notice
19+
* Add Gitter badge to README
20+
* [docs] Add an example of pipeline schedule vars listing
21+
* [cli] Exit on config parse error, instead of crashing
22+
* Add support for resource label events
23+
* [docs] Fix the milestone filetring doc (iid -> iids)
24+
* [docs] Fix typo in custom attributes example
25+
* Improve error message handling in exceptions
26+
* Add support for members all() method
27+
* Add access control options to protected branch creation
28+
29+
Version 1.6.0_ - 2018-08-25
30+
---------------------------
31+
32+
* [docs] Don't use hardcoded values for ids
33+
* [docs] Improve the snippets examples
34+
* [cli] Output: handle bytes in API responses
35+
* [cli] Fix the case where we have nothing to print
36+
* Project import: fix the override_params parameter
37+
* Support group and global MR listing
38+
* Implement MR.pipelines()
39+
* MR: add the squash attribute for create/update
40+
* Added support for listing forks of a project
41+
* [docs] Add/update notes about read-only objects
42+
* Raise an exception on https redirects for PUT/POST
43+
* [docs] Add a FAQ
44+
* [cli] Fix the project-export download
45+
446
Version 1.5.1_ - 2018-06-23
547
---------------------------
648

@@ -643,7 +685,9 @@ Version 0.1 - 2013-07-08
643685

644686
* Initial release
645687

646-
.. _1.5.1: https://github.com/python-gitlab/python-gitlab/compare/1.4.0...1.5.1
688+
.. _1.7.0: https://github.com/python-gitlab/python-gitlab/compare/1.6.0...1.7.0
689+
.. _1.6.0: https://github.com/python-gitlab/python-gitlab/compare/1.5.1...1.6.0
690+
.. _1.5.1: https://github.com/python-gitlab/python-gitlab/compare/1.5.0...1.5.1
647691
.. _1.5.0: https://github.com/python-gitlab/python-gitlab/compare/1.4.0...1.5.0
648692
.. _1.4.0: https://github.com/python-gitlab/python-gitlab/compare/1.3.0...1.4.0
649693
.. _1.3.0: https://github.com/python-gitlab/python-gitlab/compare/1.2.0...1.3.0

Dockerfile

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
FROM python:3.7-alpine AS build
2+
3+
WORKDIR /opt/python-gitlab
4+
COPY . .
5+
RUN python setup.py bdist_wheel
6+
7+
FROM python:3.7-alpine
8+
9+
WORKDIR /opt/python-gitlab
10+
COPY --from=build /opt/python-gitlab/dist dist/
11+
RUN pip install PyYaml
12+
RUN pip install $(find dist -name *.whl) && \
13+
rm -rf dist/
14+
COPY docker-entrypoint.sh /usr/local/bin/
15+
16+
ENTRYPOINT ["docker-entrypoint.sh"]
17+
CMD ["--version"]

README.rst

+34
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@
1010
.. image:: https://img.shields.io/pypi/pyversions/python-gitlab.svg
1111
:target: https://pypi.python.org/pypi/python-gitlab
1212

13+
.. image:: https://img.shields.io/gitter/room/python-gitlab/Lobby.svg
14+
:target: https://gitter.im/python-gitlab/Lobby
15+
1316
Python GitLab
1417
=============
1518

@@ -35,6 +38,27 @@ Install with pip
3538
3639
pip install python-gitlab
3740
41+
42+
Using the python-gitlab docker image
43+
====================================
44+
45+
How to build
46+
------------
47+
48+
``docker build -t python-gitlab:TAG .``
49+
50+
How to use
51+
----------
52+
53+
``docker run -it --rm -e GITLAB_PRIVATE_TOKEN=<your token> -v /path/to/python-gitlab.cfg:/python-gitlab.cfg python-gitlab <command> ...``
54+
55+
To change the GitLab URL, use `-e GITLAB_URL=<your url>`
56+
57+
58+
Bring your own config file:
59+
``docker run -it --rm -v /path/to/python-gitlab.cfg:/python-gitlab.cfg -e GITLAB_CFG=/python-gitlab.cfg python-gitlab <command> ...``
60+
61+
3862
Bug reports
3963
===========
4064

@@ -48,6 +72,13 @@ Documentation
4872
The full documentation for CLI and API is available on `readthedocs
4973
<http://python-gitlab.readthedocs.org/en/stable/>`_.
5074

75+
Build the docs
76+
--------------
77+
You can build the documentation using ``sphinx``::
78+
79+
pip install sphinx
80+
python setup.py build_sphinx
81+
5182

5283
Contributing
5384
============
@@ -60,6 +91,9 @@ You can contribute to the project in multiple ways:
6091
* Add unit and functional tests
6192
* Everything else you can think of
6293

94+
We prefer commit messages to be formatted using the `conventional-changelog <https://github.com/angular/angular/blob/master/CONTRIBUTING.md#-commit-message-guidelines>`_.
95+
This leads to more readable messages that are easy to follow when looking through the project history.
96+
6397
Provide your patches as github pull requests. Thanks!
6498

6599
Running unit tests

RELEASE_NOTES.rst

+30
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,34 @@ Release notes
44

55
This page describes important changes between python-gitlab releases.
66

7+
Changes from 1.7 to 1.8
8+
=======================
9+
10+
* You can now use the ``query_parameters`` argument in method calls to define
11+
arguments to send to the GitLab server. This allows to avoid conflicts
12+
between python-gitlab and GitLab server variables, and allows to use the
13+
python reserved keywords as GitLab arguments.
14+
15+
The following examples make the same GitLab request with the 2 syntaxes::
16+
17+
projects = gl.projects.list(owned=True, starred=True)
18+
projects = gl.projects.list(query_parameters={'owned': True, 'starred': True})
19+
20+
The following example only works with the new parameter::
21+
22+
activities = gl.user_activities.list(
23+
query_parameters={'from': '2019-01-01'},
24+
all=True)
25+
26+
Changes from 1.5 to 1.6
27+
=======================
28+
29+
* When python-gitlab detects HTTP redirections from http to https it will raise
30+
a RedirectionError instead of a cryptic error.
31+
32+
Make sure to use an ``https://`` protocol in your GitLab URL parameter if the
33+
server requires it.
34+
735
Changes from 1.4 to 1.5
836
=======================
937

@@ -14,6 +42,7 @@ Changes from 1.4 to 1.5
1442
configuration, epics.
1543
* The ``GetFromListMixin`` class has been removed. The ``get()`` method is not
1644
available anymore for the following managers:
45+
1746
- UserKeyManager
1847
- DeployKeyManager
1948
- GroupAccessRequestManager
@@ -27,6 +56,7 @@ Changes from 1.4 to 1.5
2756
- ProjectPipelineJobManager
2857
- ProjectAccessRequestManager
2958
- TodoManager
59+
3060
* ``ProjectPipelineJob`` do not heritate from ``ProjectJob`` anymore and thus
3161
can only be listed.
3262

contrib/docker/Dockerfile

-10
This file was deleted.

contrib/docker/README.rst

-19
This file was deleted.

contrib/docker/python-gitlab.cfg

-15
This file was deleted.

docker-entrypoint.sh

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
#!/bin/sh
2+
3+
GITLAB_CFG=${GITLAB_CFG:-"/etc/python-gitlab-default.cfg"}
4+
5+
cat << EOF > /etc/python-gitlab-default.cfg
6+
[global]
7+
default = gitlab
8+
ssl_verify = ${GITLAB_SSL_VERIFY:-true}
9+
timeout = ${GITLAB_TIMEOUT:-5}
10+
api_version = ${GITLAB_API_VERSION:-4}
11+
per_page = ${GITLAB_PER_PAGE:-10}
12+
13+
[gitlab]
14+
url = ${GITLAB_URL:-https://gitlab.com}
15+
private_token = ${GITLAB_PRIVATE_TOKEN}
16+
oauth_token = ${GITLAB_OAUTH_TOKEN}
17+
http_username = ${GITLAB_HTTP_USERNAME}
18+
http_password = ${GITLAB_HTTP_PASSWORD}
19+
EOF
20+
21+
exec gitlab --config-file "${GITLAB_CFG}" "$@"

0 commit comments

Comments
 (0)