autocomplete icon indicating copy to clipboard operation
autocomplete copied to clipboard

idea: assign CODEOWNERS by file

Open ejcheng opened this issue 3 years ago β€’ 27 comments

Sanity checks

Feature Details

Description:

In the autocomplete repo, would it be better to assign spec creators as codeowners for the spec they created? E.g. you created the gh spec, you are added in CODEOWNERS for that specific file

I believe this would help other people, in addition to the creator, change and revise specs, because the creator will be pinged whenever there is a PR affecting the file, and they could offer their input.

ejcheng avatar Dec 03 '21 06:12 ejcheng

Having to maintain the codeowners file honestly doesn't sound as the most appealing thing to me.

fedeci avatar Dec 03 '21 09:12 fedeci

Having to maintain the codeowners file honestly doesn't sound as the most appealing thing to me.

Maybe, we could have people add themselves to CODEOWNERS in the same PR when they add new specs?

ejcheng avatar Dec 03 '21 15:12 ejcheng

Let's wait to hear what @mschrage and @QuiiBz think.

fedeci avatar Dec 03 '21 19:12 fedeci

I really like this idea! I think it empowers contributors and will keep people more involved.

I wonder if this can be done with a GitHub action?

mschrage avatar Dec 04 '21 19:12 mschrage

I really like this idea! I think it empowers contributors and will keep people more involved.

I wonder if this can be done with a GitHub action?

It probably could be done with an action, is there any variable you can call in the GitHub API for PRs that is something similar to "files_affected"?

ejcheng avatar Dec 04 '21 19:12 ejcheng

Not sure how this could be implemented with a GH action. Also, sometimes people who create a spec don't want to maintain it, so this would have to be optional.

QuiiBz avatar Dec 04 '21 19:12 QuiiBz

Not sure how this could be implemented with a GH action. Also, sometimes people who create a spec don't want to maintain it, so this would have to be optional.

@mschrage, any ideas on how this can be implemented while making it optional? A GH action probably wouldn't work.

ejcheng avatar Dec 04 '21 20:12 ejcheng

@import-brain @QuiiBz Could it be done as a precommit hook?

If a new spec is staged that has no codeowner, the commit hook can ask the user to enter their Github username if they would like to become the owner of the spec.

mschrage avatar Dec 06 '21 19:12 mschrage

I think we can do something with fig-bot in the PR body instead.

fedeci avatar Dec 06 '21 19:12 fedeci

I think we can do something with fig-bot in the PR body instead.

Yeah, perhaps a checkbox? That could work

ejcheng avatar Dec 06 '21 21:12 ejcheng

@import-brain would you be interested in implementing this?

mschrage avatar Dec 06 '21 22:12 mschrage

@import-brain would you be interested in implementing this?

This is neither my area of expertise nor my cup of tea, is there anyone that knows how to implement it well? Who wrote the bot?

Or, is there a central todo list of new features to be implemented? This could go on there.

ejcheng avatar Dec 06 '21 22:12 ejcheng

I think Tim wrote it, right @mschrage?

fedeci avatar Dec 07 '21 09:12 fedeci

Yeah! But I'm not sure if he has time to work on this unfortunately.

mschrage avatar Dec 08 '21 20:12 mschrage

Yeah! But I'm not sure if he has time to work on this unfortunately.

Well then, perhaps I could give it a try. With some experimentation, I could probably whip something up that works, might take a decent bit of time though...

ejcheng avatar Dec 08 '21 22:12 ejcheng

I can do it eventually, but it wouldn't be my priority.

fedeci avatar Dec 09 '21 10:12 fedeci

I can do it eventually, but it wouldn't be my priority.

Sounds good to me

ejcheng avatar Dec 09 '21 13:12 ejcheng

Ohhhhh I like this, I would really love to do this. I can prototype a GitHub action tonight and show you, unless you folks @import-brain @fedeci wanna take your time with it

bogdaaamn avatar Dec 09 '21 15:12 bogdaaamn

Love it!πŸ”₯

fedeci avatar Dec 09 '21 15:12 fedeci

Ohhhhh I like this, I would really love to do this. I can prototype a GitHub action tonight and show you, unless you folks @import-brain @fedeci wanna take your time with it

Great, please do it! I am not very experienced in actions, you'll do better than what I could do :)

ejcheng avatar Dec 09 '21 15:12 ejcheng

@BogDAAAMN have you already started working on this? If not I can do it tomorrow.

fedeci avatar Dec 20 '21 20:12 fedeci

Noo, I totally overestimated my free time, I am sorry 😭 Started trying some stuff, but it's not worth checking out. Please do, I'd be happy to see what you do

bogdaaamn avatar Dec 21 '21 11:12 bogdaaamn

Drafted this https://github.com/fedeci/add-codeowners-action. It is a minimal version but it works, I will update it in the next days to support more features and to improve reliability

fedeci avatar Dec 25 '21 17:12 fedeci

Drafted this fedeci/add-codeowners-action. It is a minimal version but it works, I will update it in the next days to support more features and to improve reliability

Wow, this looks great, thank you!

ejcheng avatar Dec 27 '21 12:12 ejcheng

Based on the fact that #806 was merged, I think this can be closed.

All, thank you for the great work! πŸš€

ejcheng avatar Jan 01 '22 21:01 ejcheng

It was merged and reverted, I prefer to keep this openπŸ˜…

fedeci avatar Jan 01 '22 22:01 fedeci

It was merged and reverted, I prefer to keep this openπŸ˜…

Didn't notice the revert PR, my bad πŸ˜…

ejcheng avatar Jan 02 '22 05:01 ejcheng