Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
The Tor Project
TPA
Anonymous Ticket Portal
Commits
f3ca2165
Commit
f3ca2165
authored
Feb 10, 2021
by
MariaV
Browse files
Merge branch 'public_api' into 'master'
Added public API calls See merge request
!80
parents
26085a02
30e784d7
Changes
2
Hide whitespace changes
Inline
Side-by-side
anonticket/tests.py
View file @
f3ca2165
...
...
@@ -307,7 +307,7 @@ class TestProjectDetailViewPagination(TestCase):
tor_project
=
Project
(
gitlab_id
=
426
)
tor_project
.
save
()
self
.
tor_project
=
tor_project
self
.
gl_project
=
g
itlab_get_projec
t
(
426
,
lazy
=
True
)
self
.
gl_project
=
g
l_public
.
projects
.
ge
t
(
426
,
lazy
=
True
)
self
.
open_issues_metadata
=
self
.
get_issues_metadata
(
'opened'
)
self
.
closed_issues_metadata
=
self
.
get_issues_metadata
(
'closed'
)
# Get metadata for open issues, including total and pages
...
...
anonticket/views.py
View file @
f3ca2165
...
...
@@ -110,6 +110,7 @@ class PassUserIdentifierMixin:
# Easy to parse version of GitLab-Python functions.
# ----------------------------------------------------------------------
gl
=
gitlab
.
Gitlab
(
settings
.
GITLAB_URL
,
private_token
=
settings
.
GITLAB_SECRET_TOKEN
)
gl_public
=
gitlab
.
Gitlab
(
settings
.
GITLAB_URL
)
def
gitlab_get_project
(
project
,
lazy
=
False
):
"""Takes an integer, and grabs a gitlab project where gitlab_id
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a 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