Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Philipp Wolfer
funkwhale
Commits
b1fdab64
Verified
Commit
b1fdab64
authored
Jun 28, 2019
by
Eliot Berriot
Browse files
Merge branch 'release/0.19.1'
parents
6ffae9f5
8f3a8243
Changes
24
Hide whitespace changes
Inline
Side-by-side
changes/changelog.d/867.enhancement
deleted
100644 → 0
View file @
6ffae9f5
Added a SUBSONIC_DEFAULT_TRANSCODING_FORMAT env var to support clients that don't provide the format parameter (#867)
changes/changelog.d/868.enhancement
deleted
100644 → 0
View file @
6ffae9f5
Added opus to the list of supported mimetypes and extensions (#868)
changes/changelog.d/869.bugfix
deleted
100644 → 0
View file @
6ffae9f5
Fixed broken user admin for users with non-digit or letters in their username (#869)
scripts/get-contributions-stats.py
View file @
b1fdab64
import
argparse
import
requests
import
os
GITLAB_URL
=
"https://dev.funkwhale.audio"
GITLAB_PROJECT_ID
=
17
...
...
@@ -82,6 +83,14 @@ def get_translations_stats(translations):
return
stats
def
get_group_usernames
(
group
):
url
=
GITLAB_URL
+
"/api/v4/groups/{}/members"
.
format
(
group
)
response
=
requests
.
get
(
url
,
headers
=
{
"PRIVATE-TOKEN"
:
os
.
environ
[
"PRIVATE_TOKEN"
]})
response
.
raise_for_status
()
data
=
response
.
json
()
return
[
r
[
"name"
]
for
r
in
data
]
def
main
():
parser
=
argparse
.
ArgumentParser
()
parser
.
add_argument
(
"ref_name"
)
...
...
@@ -90,9 +99,15 @@ def main():
since
=
get_tag_date
(
args
.
last_tag
)
commits
=
get_commits
(
args
.
ref_name
,
since
)
commits_stats
=
get_commit_stats
(
commits
)
groups
=
[(
588
,
"funkwhale/reviewers-python"
),
(
589
,
"funkwhale/reviewers-front"
)]
reviewers
=
[]
for
id
,
_
in
groups
:
reviewers
+=
get_group_usernames
(
id
)
print
(
"
\n
Reviewers:
\n
"
)
for
reviewer
in
reviewers
:
print
(
reviewer
)
commiter_names
=
commits_stats
[
"commiters"
].
keys
()
print
(
"Commiters:"
)
print
(
"
\n
Commiters:
\n
"
)
for
commiter
in
sorted
(
commits_stats
[
"commiters"
].
keys
(),
key
=
lambda
v
:
v
.
upper
()):
print
(
commiter
)
translations
=
get_translations
(
since
)
...
...
@@ -100,7 +115,7 @@ def main():
translators_ids
=
sorted
(
translations_stats
[
"translators"
].
keys
())
# There is no way to query user/author info via weblate API and we need the names…
print
(
"Execute the following SQL query on the weblate server to get the translators names:"
"
\n
Execute the following SQL query on the weblate server to get the translators names:"
)
print
(
"$ weblate dbshell"
)
print
(
...
...
Prev
1
2
Next
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