Skip to content

Commit

Permalink
Remove option to include archived projects.
Browse files Browse the repository at this point in the history
  • Loading branch information
Sarah Mount authored and aschmolck committed May 4, 2019
1 parent e85fb03 commit 298f5e8
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 11 deletions.
6 changes: 0 additions & 6 deletions marge/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,12 +167,6 @@ def regexp(str_regex):
default='.*',
help="Only process projects that match; e.g. 'some_group/.*' or '(?!exclude/me)'.\n",
)
parser.add_argument(
'--include-archived',
type=bool,
default=False,
help="Marge should process all available projects, including those that are archived.\n",
)
parser.add_argument(
'--ci-timeout',
type=time_interval,
Expand Down
2 changes: 1 addition & 1 deletion marge/bot.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ def _run(self, repo_manager):

def _get_projects(self):
log.info('Finding out my current projects...')
my_projects = Project.fetch_all_mine(self._api, self._config.include_archived)
my_projects = Project.fetch_all_mine(self._api)
project_regexp = self._config.project_regexp
filtered_projects = [p for p in my_projects if project_regexp.match(p.path_with_namespace)]
log.debug(
Expand Down
9 changes: 5 additions & 4 deletions marge/project.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,11 @@ def filter_by_path_with_namespace(projects):
return gitlab.from_singleton_list(make_project)(filter_by_path_with_namespace(all_projects))

@classmethod
def fetch_all_mine(cls, api, include_archived=False):
projects_kwargs = {'membership': True, 'with_merge_requests_enabled': True}
if not include_archived:
projects_kwargs['archived'] = False
def fetch_all_mine(cls, api):
projects_kwargs = {'membership': True,
'with_merge_requests_enabled': True,
'archived': False,
}

# GitLab has an issue where projects may not show appropriate permissions in nested groups. Using
# `min_access_level` is known to provide the correct projects, so we'll prefer this method
Expand Down

0 comments on commit 298f5e8

Please sign in to comment.