Skip to content
Snippets Groups Projects

Add ability to allow list group namespaces to bypass ECA

Merged Martin Lowe requested to merge malowe/main/eca-script-debug into main
3 unresolved threads
1 file
+ 4
0
Compare changes
  • Side-by-side
  • Inline
+ 4
0
@@ -22,6 +22,7 @@ ALLOW_LIST_PROJECTS = ['/eclipse/oniro-core/meta-ts',
@@ -22,6 +22,7 @@ ALLOW_LIST_PROJECTS = ['/eclipse/oniro-core/meta-ts',
'/eclipse/oniro-core/meta-seco-intel',
'/eclipse/oniro-core/meta-seco-intel',
'/eclipse/oniro-core/meta-zephyr'
'/eclipse/oniro-core/meta-zephyr'
]
]
 
ALLOW_LIST_GROUPS = ['eclipsefdn/it/webdev/eclipse.org-php-archives/']
    • More of an observation but we define projects with a slash at the start of the string but not groups?

      • Author Maintainer

        It's due to how that check is done, as it uses a different method to check it which is less efficient. I didn't want to touch it since it's working, but this check should be a bit more robust as it doesn't rely on the host URL

      • Please register or sign in to reply
Please register or sign in to reply
STRICT_MODE_ROOT_GROUPS = ['eclipse-research-labs/']
STRICT_MODE_ROOT_GROUPS = ['eclipse-research-labs/']
## Track whether forked project for error reporting (failing vs non-failing)
## Track whether forked project for error reporting (failing vs non-failing)
@@ -118,6 +119,9 @@ if (nil_or_empty(project_url)) then
@@ -118,6 +119,9 @@ if (nil_or_empty(project_url)) then
elsif (ALLOW_LIST_PROJECTS.any? {|repo_namespace| "#{HOST_URL}#{repo_namespace}" == project_url}) then
elsif (ALLOW_LIST_PROJECTS.any? {|repo_namespace| "#{HOST_URL}#{repo_namespace}" == project_url}) then
puts "Found allow listed project, skipping validation"
puts "Found allow listed project, skipping validation"
exit 0
exit 0
 
elsif (ALLOW_LIST_GROUPS.any? {|group_namespace| project_json_data['path_with_namespace'].start_with?(group_namespace)}) then
 
puts "Found allow listed group, skipping validation"
 
exit 0
end
end
## Get all new commits for branch, relative to itself for existing branch, relative to tree for new
## Get all new commits for branch, relative to itself for existing branch, relative to tree for new
Loading