Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
G
Gitlab-Api-Example
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
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
bielow
Gitlab-Api-Example
Commits
b468de95
Commit
b468de95
authored
2 years ago
by
bielow
Browse files
Options
Downloads
Patches
Plain Diff
fix for students with empty groups (will be skipped)
parent
24366808
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
main.py
+1
-1
1 addition, 1 deletion
main.py
projectassign.py
+3
-0
3 additions, 0 deletions
projectassign.py
students.list
+78
-60
78 additions, 60 deletions
students.list
with
82 additions
and
61 deletions
main.py
+
1
−
1
View file @
b468de95
...
@@ -34,7 +34,7 @@ def main():
...
@@ -34,7 +34,7 @@ def main():
if
(
not
token
):
if
(
not
token
):
raise
Exception
(
"
Invalid authentication token: Set $GITLABTOKEN in your environment!
"
)
raise
Exception
(
"
Invalid authentication token: Set $GITLABTOKEN in your environment!
"
)
group_id
=
None
group_id
=
None
group_name_default
=
"
adp20
19
"
;
group_name_default
=
"
adp20
22
"
;
while
(
group_id
is
None
):
while
(
group_id
is
None
):
group_name
=
input
(
"
Welche Gruppe soll bearbeitet werden (Enter =
"
+
group_name_default
+
"
)?
"
)
group_name
=
input
(
"
Welche Gruppe soll bearbeitet werden (Enter =
"
+
group_name_default
+
"
)?
"
)
if
(
not
group_name
):
if
(
not
group_name
):
...
...
This diff is collapsed.
Click to expand it.
projectassign.py
+
3
−
0
View file @
b468de95
...
@@ -41,6 +41,9 @@ def assign(apilink, token, group_name, file_students, access_level):
...
@@ -41,6 +41,9 @@ def assign(apilink, token, group_name, file_students, access_level):
students
=
readStudentList
(
file_students
)
students
=
readStudentList
(
file_students
)
for
s
in
students
:
for
s
in
students
:
print
(
"
\n
-- Student
'"
+
s
.
zedat_name
+
"'
in
'"
+
s
.
gitlab_group
+
"'"
)
print
(
"
\n
-- Student
'"
+
s
.
zedat_name
+
"'
in
'"
+
s
.
gitlab_group
+
"'"
)
if
(
s
.
gitlab_group
==
''
):
print
(
"
\n
-- Error: student
'"
+
s
.
zedat_name
+
"'
has no lab in KVV. Skipping.
"
)
continue
proj_id
=
manageprojects
.
getprojectid
(
apilink
,
token
,
group_name
,
s
.
gitlab_group
)
proj_id
=
manageprojects
.
getprojectid
(
apilink
,
token
,
group_name
,
s
.
gitlab_group
)
if
(
proj_id
is
None
):
if
(
proj_id
is
None
):
exit
(
"
Group is unknown. Please create it or correct its name
"
)
# this is a hard error -- groups are not created correctly
exit
(
"
Group is unknown. Please create it or correct its name
"
)
# this is a hard error -- groups are not created correctly
...
...
This diff is collapsed.
Click to expand it.
students.list
+
78
−
60
View file @
b468de95
petkoa97 group29
merta55 group03
namuub98 group14
alaswam95
zuelab99 group31
saraa44 group19
bindej99 group07
melia49 group36
celib10 group06
kristiaa96 group27
jessicab00 group30
farea02 group22
fu2411wx group05
renka01 group06
fisched99 group16
bitaa96 group15
ashkag98 group14
barabab03 group16
gloecknes89 group28
jonnab00 group14
gloes96 group11
benden94 group24
miag97 group11
raheb61 group37
jogosten group17
kidub03 group17
guehmam99 group26
carvalhol02
joshuag99 group30
danim02 group13
leminhduoh99 group05
claralid02 group20
harlop97 group22
debritol09 group12
mustah98 group08
veronikaed01 group02
herzlef98 group10
jannid03 group39
niclah97 group13
eflecks group05
felih21 group25
chantaf02 group20
karasinas96 group31
fuechsel02 group02
kasrat93 group12
wac0ku2 group24
khacham00 group04
fu1570in group33
alexak99 group06
antog01 group17
kirschbauc97 group27
rebeg02 group31
sophiek85 group03
guehmam99
kruegea61 group28
simoh00 group01
chial99 group20
wazzja group33
lapuj92 group10
sofiiai02
leutnes97 group22
leonigai01 group06
lutfia95 group15
luciaj00
mmertins group02
josiva group39
melim09 group23
nicolasjungh group05
niklam09 group12
karasinas96
vincem97 group26
mikak01 group22
yuwein31 group29
sajjak01 group10
leon16 group25
maltek98 group09
valentin99 group16
janak03 group09
maximilian45 group24
kochsl99 group03
ponzej97 group13
vonkom79 group11
laup55 group20
ivik99
raul00 group03
kothas84
acedon group24
kreisem01
felir69 group09
krej03 group19
amros85 group19
seol99 group12
sielatchom00 group19
emmal13 group14
schiris15 group09
malek01 group10
romas96 group08
malzea03 group04
leonat63 group07
matanam94 group04
anastat98 group04
fram01 group38
trav97 group21
vincem97
tovvoronina group32
thaon47 group08
wangw98 group15
aleo01
noraw61 group18
ezgio47
alexaw00 group27
paet02 group07
wolffm97 group32
petersob02 group31
wolffo97 group01
belap01 group23
liviawllr group18
reinej03 group38
hendriz98 group17
gesar03 group21
roschec02 group21
sagebied02
rojis00
schlenzij02
jasmis03 group07
sofyas03 group13
ls4830fu group23
spiekea25 group37
tsteuerwald group08
zakiat98
songdiet90
linhtat03 group25
nikov76 group27
tovvoronina group15
wangp97 group11
lillyw01 group01
janw02
manuez42 group16
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