Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
0bdbb1f1
Commit
0bdbb1f1
authored
Feb 28, 2022
by
Sanad Liaquat (Personal)
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Check if resource is already marked for deletion
parent
cc8c9716
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
0 deletions
+5
-0
qa/qa/resource/group_base.rb
qa/qa/resource/group_base.rb
+4
-0
qa/qa/resource/reusable_collection.rb
qa/qa/resource/reusable_collection.rb
+1
-0
No files found.
qa/qa/resource/group_base.rb
View file @
0bdbb1f1
...
...
@@ -64,6 +64,10 @@ module QA
end
end
def
marked_for_deletion?
!
parse_body
(
api_get_from
(
"
#{
api_get_path
}
"
))[
:marked_for_deletion_on
].
nil?
end
# Get group badges
#
# @return [Array<QA::Resource::GroupBadge>]
...
...
qa/qa/resource/reusable_collection.rb
View file @
0bdbb1f1
...
...
@@ -34,6 +34,7 @@ module QA
def
remove_all_via_api!
instance
.
each_resource
do
|
reuse_as
,
resource
|
next
QA
::
Runtime
::
Logger
.
debug
(
"
#{
resource
.
class
.
name
}
reused as :
#{
reuse_as
}
has already been removed."
)
unless
resource
.
exists?
next
if
resource
.
respond_to?
(
:marked_for_deletion?
)
&&
resource
.
marked_for_deletion?
resource
.
method
(
:remove_via_api!
).
super_method
.
call
end
...
...
Write
Preview
Markdown
is supported
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