Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

By default, ignore archived projects. #177

Merged
merged 2 commits into from
May 4, 2019

Conversation

snim2
Copy link
Contributor

@snim2 snim2 commented Apr 23, 2019

Closes #172

This is a first go at excluding archived projects; it likely needs better testing before it can be merged.

This PR adds a new CLI argument (--include-archived) and ENV VAR (MARGE_INCLUDE_ARCHIVED) which defaults to False. If True, Marge will process archived projects (which cannot have their MRs merged) as well as live projects (which can).

The API for Project.fetch_all_mine() has changed to include an optional argument include_archived which matches the CLI arg.

The current default behaviour is for Marge to process all projects, which wastes time and resources, linearly with the number of archived projects.

This commit adds a new CLI argument (--include-archived) and ENV
VAR (MARGE_INCLUDE_ARCHIVED) which defaults to False. If True,
Marge will process archived projects (which cannot have their MRs
merged) as well as live projects (which can).

The API for Project.fetch_all_mine() has changed to include an
optional argument include_archived which matches the CLI arg.

The current default behaviour is for Marge to process all projects,
which wastes time and resources, linearly with the number of
archived projects.
@aschmolck
Copy link
Contributor

Thanks for your contribution, and sorry for the delay!

My only review comment would be that option to inspect archived projects is not needed, if you remove it this is good to go in (i.e. archived projects should always be excluded, I don't see a case where overriding this would be useful).

@snim2
Copy link
Contributor Author

snim2 commented May 3, 2019

Many thanks, I've pushed a commit to make that change. Do you want me to squash?

@aschmolck
Copy link
Contributor

Yes, please!

@aschmolck
Copy link
Contributor

Once it's squashed, I'll merge.

@aschmolck aschmolck merged commit 298f5e8 into smarkets:master May 4, 2019
@aschmolck
Copy link
Contributor

Great – thanks!

@snim2 snim2 mentioned this pull request Jun 17, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Feature request: exclude archived projects
2 participants