ruby / gem_rbs_collection

A collection of RBS for gems.
MIT License
246 stars 101 forks source link

Add workflow script for repository management #520

Closed pocke closed 3 months ago

pocke commented 4 months ago

This PR changes the gem ownership management. The primary purpose is that the community manages RBS files for gems.

The design doc is here: https://hackmd.io/OBmj4M3tT8SOUXdGjKqntg Read this document for details.

What

This PR adds GHA workflows to merge PR by contributors and gem reviewers themselves.

Why

Previously, I was the bottleneck of this repository. I needed to review and merge all PRs. This PR changes the situation. It will achieve real community-driven RBS files. Any contributor can write RBS and become a maintainer without admin permission

How

The main feature is /merge comment command. The PR author or Gem Reviewer can trigger this command by commenting /merge on a PR. It checks the PR is ready to be merged, then merge the PR.

For former CODEOWNERS

I'll migrate the CODEOWNERS to another approach. In the new approach, they are called "Gem Reviewers". You all will be removed from the collaborator of this repository. But your permissions will be migrated to the "Gem Reviewers" one.

The responsibilities have not changed. Thanks for maintaining gems continuously. The reviewing procedure has small changes. See the CONTRIBUTING.md.

The main change is that a Gem Reviewer can merge a PR related to the maintained gem themselves. Previously, a code owner needed to wait for approval from the repository admin. You can manage RBSs more comfortably.

ybiquitous commented 3 months ago

Oops. Is this error expected?

ruby: No such file or directory -- .github/workflows/pr_bot/changed_files.rb (LoadError)

https://github.com/ruby/gem_rbs_collection/actions/runs/8321546351/job/22767965381?pr=520#step:4:10

pocke commented 3 months ago

Oops. Is this error expected?

Yes, it's because this PR has not merged yet. The workflow loads the changed_files.rb file from the main branch, but it cannot find this file now because the file is committed only on this PR branch.

This error will be recovered after this PR is merged.

ybiquitous commented 3 months ago

Got it! 👍🏼