asyncapi / community

AsyncAPI community-related stuff.
https://www.asyncapi.com/community
88 stars 95 forks source link

complete automation related to having `MAINTAINERS.yaml` always up to date with current state #1269

Open derberg opened 2 weeks ago

derberg commented 2 weeks ago

File https://github.com/asyncapi/community/blob/master/MAINTAINERS.yaml updates are manual now

We need someone to:

It is rather complex as scope is not well defined - might be that there will be one workflow more that needs review or update

ibishal commented 2 weeks ago

so we need to add one time script that will iterate over codeowner file and update maintainer.yaml, and we need to test if #248 is working(that basically updates maintainer.yaml based on changes in codeowners file). i want to work on it cc @derberg

derberg commented 2 weeks ago

@ibishal do you have any previous experience with GitHub Actions? working with GitHub API? parsing and working with CODEOWNERS?

ibishal commented 2 weeks ago

@derberg i have worked with github actions in this PR and have worked on this set of PR in asyncapi

mszostok commented 2 weeks ago

Hi all!

This issue caught my attention as I enjoy working with GitHub Actions and GitHub CODEOWNERS.

I would be happy to take this on and get it done. I briefly reviewed the PR, and overall, it looks good (I haven't tested it yet though). A few small code enhancements can be made, like don't iterate over duplicates, unify msgs, etc. I also noticed that the extractGitHubUsernames function with the regex won't work with cases like:

  1. /some/awesome/dir @Amigos # The initial owner was @mszostok, contact him in case of critical issues. - The user mentioned in the comment will be "caught" when they shouldn't be.
  2. /some/other/maybe/awesome/file.txt @gh-codeowners/all-stars @mszostok - This doesn't extract GitHub Teams. In this case, it will return [gh-codeowners, mszostok].
  3. docs/* @mszostok docs@example.com - This doesn't extract emails properly; it will return [mszostok, example].

While 2&3 cases don't need to be handled initially (since you're not using such expressions), they could be just logged to make you aware of needed adjustments, keeping the script simple for now. I just wanted to explicitly highlight this to make skipping it intentional 👍

The topic of initial update will also be an easy addition.

FYI:

Cheers!

aeworxet commented 1 week ago

Bounty Issue's service comment

Text labels: bounty/2024-Q3, bounty/advanced, bounty/coding First assignment to third-party contributors: 2024-06-21 00:00:00 UTC+12:00 End Of Life after: 2024-07-31 23:59:59 UTC-12:00

@asyncapi/bounty_team

The Bounty Program is not a Mentorship Program. The accepted level of Bounty Program Participants is Middle/Senior.
Third-party contributors should coherently articulate how they are going to approach the resolution process when expressing a desire to work on this Bounty Issue.
derberg commented 1 week ago

I'm assigning @mszostok to this issue.

For full transparency: I contacted Mateusz on my own in private to get him involved in this issue because he is one of the most senior engingeers I know from my previous company (4y ago) where we worked together. He is also active FOSS contributor - but most important is that he has extensive experience with parsing CODEOWNERS file, and thanks to his experience also with GH Action I'm finally confided to have a person working on issue without basic mentoring.

derberg commented 1 week ago

I noticed I forgot that I was suppose to wait 3 days before I publish a decision who will work on issues.

I don't have a better excuse other than "Monday". My apologies.

aeworxet commented 1 week ago

Bounty Issue's Timeline

Complexity Level Assignment Date (by GitHub) Start Date (by BP Rules) End Date (by BP Rules) Draft PR Submission Final PR Merge Start Final PR Merge End
Advanced 2024-06-17 2024-07-01 2024-08-25 2024-07-21 2024-08-11 2024-08-25
Please note that the dates given represent deadlines, not specific dates, so if the goal is reached sooner, it's better.
Keep in mind the responsibility for violations of the Timeline.
mszostok commented 5 days ago

Sharing the progress from last week.

I spoke with @derberg to establish the overall scope of the task. In general:

Goals

  1. Initially update of MAINTAINERS.yaml to match CODEOWNERS files in public, non-archived repos under the asyncapi org.
    • This is required as the current one is outdated. I already confirmed that.
  2. Automatically create a PR with an updated MAINTAINERS.yaml file when CODEOWNERS is changed in public, non-archived repos on the main branch.
  3. Provide an option to update MAINTAINERS.yaml if a repository is archived.
    • Automation is not required as such repositories are moved to a special “archive” organization and it may make it harder to create.

Non-goals

  1. Support for GitHub teams, plain user emails, and corporate users.

    NOTE: I'm not sure here, as I already saw a usage of GitHub teams in some CODEOWNERS file.

  2. Validate the CODEOWNERS file (e.g., checking maintainers' rights).
    • This can be done later.

      NOTE: I already know that there are invalid CODEOWNERS files, so it would be beneficial to consider such validator at later stage.

  3. Automatically resolve merge conflicts for PRs updating the MAINTAINERS.yaml file in the community repo.
    • There is an auto-merge workflow in place. This should ensure there won’t be stale PRs that conflict with each other.
  4. Update the maintainers.yaml file if a repository changes from private to public and vice versa.
    • AsyncAPI doesn’t use private repos ❀

Notes

Links

mszostok commented 5 days ago

Initially update of MAINTAINERS.yaml

I finished the early POC last week for generating MAINTAINERS.yaml from scratch by indexing all repositories under AsyncAPI.

Outcome

Honestly, at this stage, I don't know if incremental changes (calculating added/removed users) make any sense. Of course, I will test that too. However, I think it may bring unnecessary complexity, while a full refresh seems to be quite fast and doesn't consume that many tokens.

Human readable report of MAINTAINERS.yaml changes

Link 👉 https://gist.github.com/mszostok/e7eff08b5bf255f373dcf033459264b8#file-maintainers-diff-md

Fresh MAINTAINERS.yaml file

[!IMPORTANT] Each entry is missing valid data for those entries: linkedin, slack, and isTscMember I still need to learn/figure out from where to take those properties 💭

New maintainers.yaml file

```yaml - name: Fran MĂ©ndez github: fmvilas linkedin: '' slack: '' twitter: null availableForHire: false isTscMember: false repos: - spec - spec-json-schemas - asyncapi-react - extensions-catalog - converter-js - bindings - enterprise-patterns - raml-dt-schema-parser - openapi-schema-parser - html-template - markdown-template - nodejs-ws-template - generator-filters - generator-hooks - brand - name: Lukasz Gornicki github: derberg linkedin: '' slack: '' twitter: derberq availableForHire: true isTscMember: false repos: - spec - website - spec-json-schemas - generator - asyncapi-react - extensions-catalog - bindings - enterprise-patterns - html-template - markdown-template - nodejs-template - nodejs-ws-template - java-spring-template - .github - generator-filters - jasyncapi - generator-hooks - vs-asyncapi-preview - template-for-generator-templates - community - diff - chatbot - infra - name: Dale Lane github: dalelane linkedin: '' slack: '' twitter: dalelane availableForHire: false isTscMember: false repos: - spec - spec-json-schemas - bindings - avro-schema-parser - java-template - name: Sergio Moya github: smoya linkedin: '' slack: '' twitter: smoyac availableForHire: true isTscMember: false repos: - spec - spec-json-schemas - parser-go - parser-js - converter-go - bindings - raml-dt-schema-parser - openapi-schema-parser - avro-schema-parser - go-watermill-template - template-for-go-projects - parser-api - server-api - infra - name: VladimĂ­r Gorej github: char0n linkedin: '' slack: '' twitter: vladimirgorej availableForHire: true isTscMember: false repos: - spec - spec-json-schemas - bindings - name: null github: asyncapi-bot-eve linkedin: '' slack: '' twitter: AsyncAPISpec availableForHire: false isTscMember: false repos: - spec - website - spec-json-schemas - generator - asyncapi-react - parser-go - parser-js - extensions-catalog - converter-js - converter-go - bindings - enterprise-patterns - tck - studio - raml-dt-schema-parser - openapi-schema-parser - html-template - markdown-template - nodejs-template - nodejs-ws-template - java-spring-template - java-spring-cloud-stream-template - python-paho-template - ts-nats-template - .github - generator-filters - jasyncapi - generator-hooks - avro-schema-parser - dotnet-nats-template - go-watermill-template - vs-asyncapi-preview - template-for-generator-templates - generator-react-sdk - modelina - php-template - cli - community - simulator - template-for-go-projects - parser-api - training - diff - optimizer - chatbot - glee - bundler - server-api - brand - infra - java-template - dotnet-rabbitmq-template - EDAVisualiser - problem - jasyncapi-idea-plugin - protobuf-schema-parser - learning-paths - name: Heiko Henning github: GreenRover linkedin: '' slack: '' twitter: null availableForHire: false isTscMember: false repos: - spec - spec-json-schemas - bindings - protobuf-schema-parser - name: Akshat Nema github: akshatnema linkedin: '' slack: '' twitter: Aksnema availableForHire: true isTscMember: false repos: - website - name: Maciej UrbaƄczyk github: magicmatatjahu linkedin: '' slack: '' twitter: null availableForHire: false isTscMember: false repos: - website - generator - asyncapi-react - parser-go - parser-js - converter-js - converter-go - studio - html-template - markdown-template - ts-nats-template - dotnet-nats-template - template-for-generator-templates - generator-react-sdk - modelina - template-for-go-projects - diff - chatbot - server-api - EDAVisualiser - problem - name: Ansh Goyal github: anshgoyalevil linkedin: '' slack: '' twitter: thisisanshg availableForHire: true isTscMember: false repos: - website - name: Aishat Muibudeen github: mayaleeeee linkedin: '' slack: '' twitter: maya_ux_ui availableForHire: false isTscMember: false repos: - website - name: 'Quetzalli ' github: alequetzalli linkedin: '' slack: '' twitter: QuetzalliWrites availableForHire: false isTscMember: false repos: - website - .github - community - training - name: V Thulisile Sibanda github: thulieblack linkedin: '' slack: '' twitter: thulieblack availableForHire: true isTscMember: false repos: - website - conference-website - community - name: Jonas Lagoni github: jonaslagoni linkedin: '' slack: '' twitter: jonaslagoni availableForHire: false isTscMember: false repos: - spec-json-schemas - generator - parser-js - converter-js - ts-nats-template - dotnet-nats-template - generator-react-sdk - modelina - simulator - parser-api - EDAVisualiser - name: Pavel Bodiachevskii github: pakisan linkedin: '' slack: '' twitter: null availableForHire: false isTscMember: false repos: - spec-json-schemas - jasyncapi - name: Mihael Bosnjak github: mboss37 linkedin: '' slack: '' twitter: null availableForHire: false isTscMember: false repos: - spec-json-schemas - bindings - name: Gerald Loeffler github: GeraldLoeffler linkedin: '' slack: '' twitter: null availableForHire: false isTscMember: false repos: - spec-json-schemas - bindings - name: Richard Coppen github: rcoppen linkedin: '' slack: '' twitter: null availableForHire: false isTscMember: false repos: - spec-json-schemas - bindings - name: Steve Head github: SrfHead linkedin: '' slack: '' twitter: null availableForHire: false isTscMember: false repos: - spec-json-schemas - bindings - name: Laurent Broudoux github: lbroudoux linkedin: '' slack: '' twitter: lbroudoux availableForHire: true isTscMember: false repos: - spec-json-schemas - bindings - name: Jeremy Whitlock github: whitlockjc linkedin: '' slack: '' twitter: null availableForHire: false isTscMember: false repos: - spec-json-schemas - bindings - name: Michael Davis github: damaru-inc linkedin: '' slack: '' twitter: damaru_inc availableForHire: false isTscMember: false repos: - spec-json-schemas - bindings - java-spring-cloud-stream-template - python-paho-template - name: Cameron Rushton github: CameronRushton linkedin: '' slack: '' twitter: null availableForHire: false isTscMember: false repos: - spec-json-schemas - bindings - java-spring-cloud-stream-template - python-paho-template - name: Alex Wichmann github: VisualBean linkedin: '' slack: '' twitter: null availableForHire: true isTscMember: false repos: - spec-json-schemas - bindings - saunter - name: Dec Kolakowski github: dpwdec linkedin: '' slack: '' twitter: null availableForHire: false isTscMember: false repos: - spec-json-schemas - bindings - name: Ian Cooper github: iancooper linkedin: '' slack: '' twitter: ICooper availableForHire: false isTscMember: false repos: - spec-json-schemas - bindings - name: Khuda Dad Nomani github: KhudaDad414 linkedin: '' slack: '' twitter: null availableForHire: false isTscMember: false repos: - spec-json-schemas - studio - .github - glee - name: Florence Njeri github: Florence-Njeri linkedin: '' slack: '' twitter: null availableForHire: true isTscMember: false repos: - generator - name: Michael Wildman github: m-wild linkedin: '' slack: '' twitter: null availableForHire: false isTscMember: false repos: - saunter - name: yurvon-screamo github: yurvon-screamo linkedin: '' slack: '' twitter: null availableForHire: false isTscMember: false repos: - saunter - name: Pavel Bodiachevskii github: Pakisan linkedin: '' slack: '' twitter: null availableForHire: false isTscMember: false repos: - tck - jasyncapi-idea-plugin - name: samz github: Amzani linkedin: '' slack: '' twitter: null availableForHire: false isTscMember: false repos: - studio - cli - name: Prince Rajpoot github: princerajpoot20 linkedin: '' slack: '' twitter: null availableForHire: false isTscMember: false repos: - studio - name: Jonathan Stoikovitch github: jstoiko linkedin: '' slack: '' twitter: jstoiko availableForHire: false isTscMember: false repos: - raml-dt-schema-parser - name: Rishi github: kaushik-rishi linkedin: '' slack: '' twitter: KaushikRishi07 availableForHire: false isTscMember: false repos: - nodejs-template - name: Semen github: Tenischev linkedin: '' slack: '' twitter: null availableForHire: false isTscMember: false repos: - java-spring-template - name: 'Ace ' github: AceTheCreator linkedin: '' slack: '' twitter: _acebuild availableForHire: true isTscMember: false repos: - conference-website - chatbot - name: Aishat Muibudeen github: Mayaleeeee linkedin: '' slack: '' twitter: maya_ux_ui availableForHire: false isTscMember: false repos: - conference-website - name: Ludovic Dussart github: M3lkior linkedin: '' slack: '' twitter: ldussart availableForHire: false isTscMember: false repos: - avro-schema-parser - name: null github: anandsunderraman linkedin: '' slack: '' twitter: anandsunderr availableForHire: false isTscMember: false repos: - go-watermill-template - name: IvĂĄn GarcĂ­a Sainz-Aja github: ivangsa linkedin: '' slack: '' twitter: null availableForHire: false isTscMember: false repos: - vs-asyncapi-preview - name: Kenneth Aasan github: kennethaasan linkedin: '' slack: '' twitter: null availableForHire: false isTscMember: false repos: - modelina - name: Ashmit JaiSarita Gupta github: devilkiller-ag linkedin: '' slack: '' twitter: jaisarita availableForHire: true isTscMember: false repos: - modelina - name: Akshit Gupta github: akkshitgupta linkedin: '' slack: '' twitter: akkshitgupta availableForHire: true isTscMember: false repos: - modelina - name: Samriddhi github: Samridhi-98 linkedin: '' slack: '' twitter: Samriddhi981 availableForHire: false isTscMember: false repos: - modelina - name: Leigh Johnson github: leigh-johnson linkedin: '' slack: '' twitter: grepLeigh availableForHire: false isTscMember: false repos: - modelina - name: Zbigniew Malcherczyk github: ferror linkedin: '' slack: '' twitter: null availableForHire: false isTscMember: false repos: - modelina - name: null github: artur-ciocanu linkedin: '' slack: '' twitter: null availableForHire: false isTscMember: false repos: - modelina - name: Emiliano Zublena github: emilianozublena linkedin: '' slack: '' twitter: null availableForHire: true isTscMember: false repos: - php-template - name: souvik github: Souvikns linkedin: '' slack: '' twitter: souvik_ns availableForHire: false isTscMember: false repos: - cli - glee - bundler - name: Ashish Padhy github: Shurtu-gal linkedin: '' slack: '' twitter: Shurtu_Gal availableForHire: false isTscMember: false repos: - cli - name: null github: NektariosFifes linkedin: '' slack: '' twitter: null availableForHire: false isTscMember: false repos: - simulator - name: Aayush Sahu github: aayushmau5 linkedin: '' slack: '' twitter: null availableForHire: false isTscMember: false repos: - diff - name: Vinit Shahdeo github: vinitshahdeo linkedin: '' slack: '' twitter: Vinit_Shahdeo availableForHire: true isTscMember: false repos: - diff - name: Anubhav Vats github: onbit-uchenik linkedin: '' slack: '' twitter: postmanlabs availableForHire: true isTscMember: false repos: - diff - name: Khuda Dad Nomani github: khudadad414 linkedin: '' slack: '' twitter: null availableForHire: false isTscMember: false repos: - optimizer - name: Viacheslav Turovskyi github: aeworxet linkedin: '' slack: '' twitter: null availableForHire: false isTscMember: false repos: - optimizer - bundler - name: David Pereira github: BOLT04 linkedin: '' slack: '' twitter: BOLT2938 availableForHire: false isTscMember: false repos: - server-api - name: Missy Turco github: mcturco linkedin: '' slack: '' twitter: missyturco availableForHire: false isTscMember: false repos: - brand - name: Akshaya Gurlhosur github: AGurlhosur linkedin: '' slack: '' twitter: null availableForHire: false isTscMember: false repos: - java-template - name: Dan Raper github: dan-r linkedin: '' slack: '' twitter: null availableForHire: true isTscMember: false repos: - java-template - name: Kieran Murphy github: KieranM1999 linkedin: '' slack: '' twitter: null availableForHire: false isTscMember: false repos: - java-template - name: Lewis Relph github: lewis-relph linkedin: '' slack: '' twitter: null availableForHire: false isTscMember: false repos: - java-template - name: Tom Jefferson github: JEFFLUFC linkedin: '' slack: '' twitter: null availableForHire: false isTscMember: false repos: - java-template - name: Peter Wikström github: mr-nuno linkedin: '' slack: '' twitter: null availableForHire: false isTscMember: false repos: - dotnet-rabbitmq-template - name: null github: connil linkedin: '' slack: '' twitter: null availableForHire: false isTscMember: false repos: - dotnet-rabbitmq-template - name: Abir github: imabp linkedin: '' slack: '' twitter: imabptweets availableForHire: false isTscMember: false repos: - problem - name: null github: theschles linkedin: '' slack: '' twitter: null availableForHire: true isTscMember: false repos: - jasyncapi-idea-plugin - name: Philip Schlesinger @ Cryoport github: philCryoport linkedin: '' slack: '' twitter: null availableForHire: false isTscMember: false repos: - jasyncapi-idea-plugin - name: null github: nathanaelweber linkedin: '' slack: '' twitter: null availableForHire: false isTscMember: false repos: - protobuf-schema-parser - name: Barbanio GonzĂĄlez github: Barbanio linkedin: '' slack: '' twitter: null availableForHire: false isTscMember: false repos: - learning-paths ```