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

skip_groups doesn't work for subgroup #275

Open
aleung opened this issue Sep 17, 2021 · 3 comments
Open

skip_groups doesn't work for subgroup #275

aleung opened this issue Sep 17, 2021 · 3 comments
Labels

Comments

@aleung
Copy link
Contributor

aleung commented Sep 17, 2021

Describe the bug

On our GitLab server, there is a top level group ei and several levels of subgroups under it.

My config file has subgroup name set into skip_groups:

projects_and_groups:
  "*":
    # configurations
skip_groups:
  - ei/demo

Run gitlabform on the group ei:

gitlabform ei

I expect the projects ei/demo/* are skipped, but all of them had be configured.

Read the source code, I saw that _remove_skipped_groups is called only when target is ALL or ALL_DEFINED and isn't applied if target is a group.

https://github.com/egnyte/gitlabform/blob/dbb53da60c5366295a4269fec2577b34be1a862f/gitlabform/input.py#L28

GitLabForm version

2.2.0

@gdubicki
Copy link
Member

gdubicki commented Sep 17, 2021

Hi @aleung ! Thanks for reporting this.

I am not sure if we should treat it as a bug or a feature request though. This kind of matters because I try to fix bugs ASAP while the feature requests are preferred to be developed by the community with PRs. 😅

Anyway, if you got this far that you saw the code that would need to be changed to fix implement it, perhaps you could provide a Pull Request?

@gdubicki
Copy link
Member

Implemented/fixed in v2.4.0, released a moment ago.

@aleung
Copy link
Contributor Author

aleung commented Sep 22, 2021

#276 hasn't fixed it.

projects_and_groups:
  "*":
    # configurations
skip_groups:
  - ei/demo

If the CLI parameter points to the subgroup , it's skipped as expected.

gitlabform ei/demo

But when the parameter points to the parent group, the subgroup isn't skipped.

gitlabform ei
# ei/demo isn't skipped

I'll check if I'm able to raise a PR to address it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants