starfish icon indicating copy to clipboard operation
starfish copied to clipboard

Add configuration options to allow filtering of employer-owned repositories

Open danisyellis opened this issue 5 years ago • 6 comments

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 avatar Oct 16 '20 01:10 danisyellis

I can try to take a crack at this !

fish-dango avatar Jun 23 '21 09:06 fish-dango

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

danisyellis avatar Jun 23 '21 19:06 danisyellis

@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.)

danisyellis avatar Oct 01 '21 09:10 danisyellis

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.

ak2ie avatar May 25 '22 13:05 ak2ie

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

kevindigo avatar May 26 '22 23:05 kevindigo

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.

ak2ie avatar May 29 '22 14:05 ak2ie