Skip to content
This repository has been archived by the owner on Aug 16, 2023. It is now read-only.

Add configuration options to allow filtering of employer-owned repositories #66

Open
danisyellis opened this issue Oct 16, 2020 · 6 comments

Comments

@danisyellis
Copy link
Collaborator

danisyellis commented Oct 16, 2020

Currently Starfish does not filter out events in repositories owned by specific organizations. Future users may want to exclude contributions into repositories that their employer owns (key point - one employer may own many GitHub Organizations). We should add configuration options that allow future users to easily implement their own policies regarding where events will be counted.

The simplest version of this would be to:

Add a variable to the .env.template:

Filter Out Events From These Owners ([List,Of,Owners], default to an empty list)
Add a new filterResponseFor function that filters the events based off these variables.

Add documentation in the README for using this env variable.

The person taking this on may want to look at the IGNORE_SELFOWNED_EVENTS env variable and how it's used, because it's also filtering out a certain kind of event.

@danisyellis danisyellis added the good first issue Good for newcomers label Dec 9, 2020
@danisyellis danisyellis added the up-for-grabs This issue is ready to be worked on, and unassigned label Jan 22, 2021
@fish-dango
Copy link

I can try to take a crack at this !

@danisyellis
Copy link
Collaborator Author

That would be great. Thanks fish-dango! Let me know if you have any questions.

@danisyellis
Copy link
Collaborator Author

@fish-dango are you still planning to work on this? It's been a few months and I haven't heard anything. No worries if you're too busy, just let us know because someone else might be excited to try it as a Hacktoberfest project.
(If we don't hear back from Fish by a week from now (October 8th) I'd say it's fair for someone else to pick it up.)

@ak2ie
Copy link

ak2ie commented May 25, 2022

May I take charge of this issue?

I am considering the following responses

  1. Add IGNORE_REPOSITORY_IDS to .env.template.
  2. Create a function to filter events.

Thank you in advance for your cooperation.

@kevindigo
Copy link
Collaborator

Hi @ak2ie!

The primary maintainer is out this week, so I'll jump in to try to help.

You mentioned adding an IGNORE_REPOSITORY_IDS setting, which sounds like a different feature than what was proposed. This issue requested the ability to ignore repos based on who owns them, rather than specifying individual repos directly. Did you intend to propose this different feature? If so, would you find it useful yourself, or are you just hoping to improve Starfish for others?

Also, I believe repos have internal "id" values that show up in API calls. I'm thinking we would want to identify repos by their group/name (indeedeng/starfish), in which case the field probably shouldn't have IDS in the name. So maybe IGNORE_REPOSITORIES would be better, and then the docs would have to describe what format the list of repo identifiers would have to conform to.

Let us know what you think.

Kevin

@ak2ie
Copy link

ak2ie commented May 29, 2022

Hi Kevin.

Thank you for your confirmation.

It seems that my understanding was insufficient and my thinking was incorrect.
I would like to add the ability to ignore repos based on the repo owner.

I would like to add IGNORE_REPOSITORIES to the .env.template.

I will give it some more thought.

Thank you in advance for your help with the above.

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

No branches or pull requests

4 participants