Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
gitlab-ci
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Iterations
Jira
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Analyze
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
Clea OS
infrastructure
gitlab-ci
Commits
89bed7e6
Commit
89bed7e6
authored
3 years ago
by
Jonas Höppner
Browse files
Options
Downloads
Patches
Plain Diff
CI: Add function to merge the gitlab-ci MRs
parent
b9cb9a29
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
common.py
+7
-1
7 additions, 1 deletion
common.py
with
7 additions
and
1 deletion
common.py
+
7
−
1
View file @
89bed7e6
...
...
@@ -241,11 +241,17 @@ def get_repository_file_obj(project: Project, filename, ref=None):
if
ref
is
None
:
ref
=
project
.
default_branch
logging
.
debug
(
"
Using default branch %s
"
,
ref
)
repository_tree
=
project
.
repository_tree
(
ref
=
ref
,
retry_transient_errors
=
True
)
repository_tree
=
project
.
repository_tree
(
ref
=
ref
,
all
=
True
,
retry_transient_errors
=
True
)
logging
.
debug
(
repository_tree
)
fileobj
=
[
f
for
f
in
repository_tree
if
f
[
"
name
"
]
==
filename
]
if
len
(
fileobj
)
==
0
:
logging
.
error
(
"
Could not find file %s
"
,
filename
)
for
f
in
repository_tree
:
logging
.
debug
(
f
[
"
name
"
])
return
None
fileobj
=
fileobj
[
0
]
return
fileobj
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