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

[Valid Owner Checker] Make the ignored owners configurable #54

Closed
mszostok opened this issue Oct 31, 2020 · 1 comment · Fixed by #55
Closed

[Valid Owner Checker] Make the ignored owners configurable #54

mszostok opened this issue Oct 31, 2020 · 1 comment · Fixed by #55
Assignees
Labels
enhancement New feature or request good first issue Good for newcomers hacktoberfest
Milestone

Comments

@mszostok
Copy link
Owner

mszostok commented Oct 31, 2020

Description

As a part of #52 issue, there was an interesting problem regarding the @ghost user which was solved by #53. This issue is about making implemented logic a little more generic and instead of hard-coding the @ghost username, it would be better to export the option which takes a list of owners e.g. users, teams, etc. that should be ignored by Valid Owner Checker.

Reasons

It's always better to have customizable logic in the library which is used by the broader community, so we can handle more custom scenarios :)

TODO

  1. Add IgnoreOwners []string `envconfig:"default=@ghost"` property in line 15 in file internal/check/valid_owner.go. In this way, this property can be automatically set by environment variable OWNER_CHECKER_IGNORE_OWNERS which can be populated with a list of owners names that should be ignored and not validated e.g. "@user,@org/team1,@ghost"

  2. In constructor NewValidOwner handle new cfg property and provide a func shouldIgnoreGitHubOwner(name) which can be used in for _, ownerName := range entry.Owners loop in line 63:

			if v.shouldIgnoreGitHubOwner(ownerName) {
				continue
			}
  1. Update README.md and describe a new environment variable OWNER_CHECKER_IGNORE_OWNERS which can be used

  2. Update action.yml with new property

@mszostok mszostok added enhancement New feature or request good first issue Good for newcomers hacktoberfest labels Oct 31, 2020
@mszostok mszostok added this to the v0.6.0 milestone Oct 31, 2020
@majakurcius
Copy link
Contributor

majakurcius commented Oct 31, 2020

Let me take it! :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers hacktoberfest
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants