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

Filter repositories in scope by their visibility #60

Merged
merged 6 commits into from
Mar 4, 2024

Conversation

gbrindisi
Copy link
Contributor

@gbrindisi gbrindisi commented Feb 26, 2024

Pull Request

Filter repositories in scope by their visibility

Proposed Changes

This PR add a configuration option to control the scope of evergreen based on the target repositories visibility.

By default all repositories are in scope, but if users desire to limit evergreen to only public repositories they now can do so by setting FILTER_VISIBILITY to public.
If they want to target private and internal repositories they can set it to private,internal and so on.

Readiness Checklist

Author/Contributor

  • If documentation is needed for this change, has that been included in this pull request
  • run make lint and fix any issues that you have introduced
  • run make test and ensure you have test coverage for the lines you are introducing

Reviewer

  • Label as either bug, documentation, enhancement, infrastructure, or breaking

@zkoppert zkoppert added the enhancement New feature or request label Feb 26, 2024
@zkoppert
Copy link
Member

Looks like there are some conflicts on this one. Would you be able to take a look at resolving them @gbrindisi ?

@gbrindisi
Copy link
Contributor Author

@zkoppert done, tests are ok and I run it locally and works as expected.

Copy link
Member

@zkoppert zkoppert left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great feature! Thanks for contributing!

@gbrindisi
Copy link
Contributor Author

@zkoppert sorry for the confusion, I tested without noticing that I had the env variable set in my environment.

I reworked the code a bit to make it more testable.

@gbrindisi
Copy link
Contributor Author

Shouldn't jscpd ignore all test files?

It seems that the ignore directive expect a glob pattern. As it is configured now with test* maybe is not catching the test files because jscpd is targeted with the abs path towards /github/workspace/*?:

024-02-29 18:16:16 [INFO]   File:[/github/workspace/test_env.py]

This config might work?

{
  "threshold": 25,
  "ignore": [
    "/github/workspace/test*"
  ],
  "absolute": true
}

@gbrindisi
Copy link
Contributor Author

@zkoppert ouch this closed automatically, take a look please 🙏

@zkoppert zkoppert reopened this Mar 4, 2024
@zkoppert zkoppert merged commit c405c0a into github:main Mar 4, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants