From c3573fc35b1d6aaf0672b9c04ef45e7218a45b92 Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Tue, 3 Feb 2026 09:23:14 -0800 Subject: [PATCH] rename to vouch --- .github/{APPROVED_CONTRIBUTORS => VOUCHED} | 4 +- .../{approved-gate.nu => vouch-gate.nu} | 40 +++++++++---------- .../{approve-contributor.nu => vouch.nu} | 34 ++++++++-------- .github/workflows/pr-gate.yml | 4 +- .../{approve-contributor.yml => vouch.yml} | 14 +++---- 5 files changed, 48 insertions(+), 48 deletions(-) rename .github/{APPROVED_CONTRIBUTORS => VOUCHED} (72%) rename .github/scripts/{approved-gate.nu => vouch-gate.nu} (72%) rename .github/scripts/{approve-contributor.nu => vouch.nu} (73%) rename .github/workflows/{approve-contributor.yml => vouch.yml} (77%) diff --git a/.github/APPROVED_CONTRIBUTORS b/.github/VOUCHED similarity index 72% rename from .github/APPROVED_CONTRIBUTORS rename to .github/VOUCHED index 0e0280f1b..233e2973a 100644 --- a/.github/APPROVED_CONTRIBUTORS +++ b/.github/VOUCHED @@ -1,4 +1,4 @@ -# GitHub handles of users approved to submit PRs. +# GitHub handles of vouched contributors. # # See CONTRIBUTING.md for details. The basic idea is that AI in particular # has made it too easy to create plausible-looking but low-quality @@ -6,6 +6,6 @@ # # One handle per line (without @). Sorted alphabetically. # -# Maintainers can add new contributors by commenting "lgtm" on an +# Maintainers can vouch for new contributors by commenting "lgtm" on an # issue by the author. mitchellh diff --git a/.github/scripts/approved-gate.nu b/.github/scripts/vouch-gate.nu similarity index 72% rename from .github/scripts/approved-gate.nu rename to .github/scripts/vouch-gate.nu index 2ff1e612a..9054e2f63 100755 --- a/.github/scripts/approved-gate.nu +++ b/.github/scripts/vouch-gate.nu @@ -2,38 +2,38 @@ use github.nu -# Approved contributor gate commands. +# Vouch gate commands. # # Environment variables required: # GITHUB_TOKEN - GitHub API token with repo access. If this isn't # set then we'll attempt to read from `gh` if it exists. def main [] { - print "Usage: approved-gate " + print "Usage: vouch-gate " print "" print "Commands:" - print " pr Check if a PR author is an approved contributor" + print " pr Check if a PR author is a vouched contributor" } -# Check if a PR author is an approved contributor. +# Check if a PR author is a vouched contributor. # # Checks if a PR author is a bot, collaborator with write access, -# or in the approved contributors list. If not approved, it closes the PR +# or in the vouched contributors list. If not vouched, it closes the PR # with a comment explaining the process. # -# Outputs a status to stdout: "skipped", "approved", or "closed" +# Outputs a status to stdout: "skipped", "vouched", or "closed" # # Examples: # # # Dry run (default) - see what would happen -# ./approved-gate.nu pr 123 +# ./vouch-gate.nu pr 123 # -# # Actually close an unapproved PR -# ./approved-gate.nu pr 123 --dry-run=false +# # Actually close an unvouched PR +# ./vouch-gate.nu pr 123 --dry-run=false # def "main pr" [ pr_number: int, # GitHub pull request number --repo (-R): string = "ghostty-org/ghostty", # Repository in "owner/repo" format - --approved-file: string = ".github/APPROVED_CONTRIBUTORS", # Path to approved contributors file + --vouched-file: string = ".github/VOUCHED", # Path to vouched contributors file --dry-run = true, # Print what would happen without making changes ] { let owner = ($repo | split row "/" | first) @@ -60,26 +60,26 @@ def "main pr" [ if ($permission in ["admin", "write"]) { print $"($pr_author) is a collaborator with ($permission) access" - print "approved" + print "vouched" return } - # Fetch approved contributors list from default branch - let file_data = github api "get" $"/repos/($owner)/($repo_name)/contents/($approved_file)?ref=($default_branch)" + # Fetch vouched contributors list from default branch + let file_data = github api "get" $"/repos/($owner)/($repo_name)/contents/($vouched_file)?ref=($default_branch)" let content = $file_data.content | decode base64 | decode utf-8 - let approved_list = $content + let vouched_list = $content | lines | each { |line| $line | str trim | str downcase } | where { |line| ($line | is-not-empty) and (not ($line | str starts-with "#")) } - if ($pr_author | str downcase) in $approved_list { - print $"($pr_author) is in the approved contributors list" - print "approved" + if ($pr_author | str downcase) in $vouched_list { + print $"($pr_author) is in the vouched contributors list" + print "vouched" return } - # Not approved - close PR with comment - print $"($pr_author) is not approved, closing PR" + # Not vouched - close PR with comment + print $"($pr_author) is not vouched, closing PR" let message = $"Hi @($pr_author), thanks for your interest in contributing! @@ -87,7 +87,7 @@ We ask new contributors to open an issue first before submitting a PR. This help **Next steps:** 1. Open an issue describing what you want to change and why \(keep it concise, write in your human voice, AI slop will be closed\) -2. Once a maintainer approves with `lgtm`, you'll be added to the approved contributors list +2. Once a maintainer vouches for you with `lgtm`, you'll be added to the vouched contributors list 3. Then you can submit your PR This PR will be closed automatically. See https://github.com/($owner)/($repo_name)/blob/($default_branch)/CONTRIBUTING.md for more details." diff --git a/.github/scripts/approve-contributor.nu b/.github/scripts/vouch.nu similarity index 73% rename from .github/scripts/approve-contributor.nu rename to .github/scripts/vouch.nu index 6edfeabb0..dddd5f90d 100755 --- a/.github/scripts/approve-contributor.nu +++ b/.github/scripts/vouch.nu @@ -2,10 +2,10 @@ use github.nu -# Approve a contributor by adding them to the APPROVED_CONTRIBUTORS file. +# Vouch for a contributor by adding them to the VOUCHED file. # # This script checks if a comment matches "lgtm", verifies the commenter has -# write access, and adds the issue author to the approved list if not already +# write access, and adds the issue author to the vouched list if not already # present. # # Environment variables required: @@ -17,16 +17,16 @@ use github.nu # Examples: # # # Dry run (default) - see what would happen -# ./approve-contributor.nu 123 456789 +# ./vouch.nu 123 456789 # -# # Actually approve a contributor -# ./approve-contributor.nu 123 456789 --dry-run=false +# # Actually vouch for a contributor +# ./vouch.nu 123 456789 --dry-run=false # def main [ issue_id: int, # GitHub issue number comment_id: int, # GitHub comment ID --repo (-R): string = "ghostty-org/ghostty", # Repository in "owner/repo" format - --approved-file: string = ".github/APPROVED_CONTRIBUTORS", # Path to approved contributors file + --vouched-file: string = ".github/VOUCHED", # Path to vouched contributors file --dry-run = true, # Print what would happen without making changes ] { let owner = ($repo | split row "/" | first) @@ -62,23 +62,23 @@ def main [ return } - # Read approved contributors file - let content = open $approved_file - let approved_list = $content + # Read vouched contributors file + let content = open $vouched_file + let vouched_list = $content | lines | each { |line| $line | str trim | str downcase } | where { |line| ($line | is-not-empty) and (not ($line | str starts-with "#")) } - # Check if already approved - if ($issue_author | str downcase) in $approved_list { - print $"($issue_author) is already approved" + # Check if already vouched + if ($issue_author | str downcase) in $vouched_list { + print $"($issue_author) is already vouched" if not $dry_run { github api "post" $"/repos/($owner)/($repo_name)/issues/($issue_id)/comments" { - body: $"@($issue_author) is already in the approved contributors list." + body: $"@($issue_author) is already in the vouched contributors list." } } else { - print "(dry-run) Would post 'already approved' comment" + print "(dry-run) Would post 'already vouched' comment" } print "already" @@ -86,7 +86,7 @@ def main [ } if $dry_run { - print $"(dry-run) Would add ($issue_author) to ($approved_file)" + print $"(dry-run) Would add ($issue_author) to ($vouched_file)" print "added" return } @@ -99,8 +99,8 @@ def main [ | append $issue_author | sort -i let new_content = ($comments | append $contributors | str join "\n") + "\n" - $new_content | save -f $approved_file + $new_content | save -f $vouched_file - print $"Added ($issue_author) to approved contributors" + print $"Added ($issue_author) to vouched contributors" print "added" } diff --git a/.github/workflows/pr-gate.yml b/.github/workflows/pr-gate.yml index bf0dd1b99..42143308a 100644 --- a/.github/workflows/pr-gate.yml +++ b/.github/workflows/pr-gate.yml @@ -25,11 +25,11 @@ jobs: name: ghostty authToken: "${{ secrets.CACHIX_AUTH_TOKEN }}" - - name: Check if contributor is approved + - name: Check if contributor is vouched env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | - nix develop -c nu .github/scripts/approved-gate.nu pr \ + nix develop -c nu .github/scripts/vouch-gate.nu pr \ -R ${{ github.repository }} \ ${{ github.event.pull_request.number }} \ --dry-run=false diff --git a/.github/workflows/approve-contributor.yml b/.github/workflows/vouch.yml similarity index 77% rename from .github/workflows/approve-contributor.yml rename to .github/workflows/vouch.yml index 47c4ede8c..bbb550dfd 100644 --- a/.github/workflows/approve-contributor.yml +++ b/.github/workflows/vouch.yml @@ -1,11 +1,11 @@ -name: Approve Contributor +name: Vouch on: issue_comment: types: [created] jobs: - approve: + vouch: if: ${{ !github.event.issue.pull_request }} runs-on: namespace-profile-ghostty-xsm permissions: @@ -25,12 +25,12 @@ jobs: name: ghostty authToken: "${{ secrets.CACHIX_AUTH_TOKEN }}" - - name: Add contributor to approved list + - name: Vouch for contributor id: update env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | - status=$(nix develop -c nu .github/scripts/approve-contributor.nu \ + status=$(nix develop -c nu .github/scripts/vouch.nu \ -R ${{ github.repository }} \ ${{ github.event.issue.number }} \ ${{ github.event.comment.id }} \ @@ -43,8 +43,8 @@ jobs: run: | git config user.name "github-actions[bot]" git config user.email "github-actions[bot]@users.noreply.github.com" - git add .github/APPROVED_CONTRIBUTORS - git diff --staged --quiet || git commit -m "chore: approve contributor ${{ github.event.issue.user.login }}" + git add .github/VOUCHED + git diff --staged --quiet || git commit -m "chore: vouch for contributor ${{ github.event.issue.user.login }}" git push - name: Comment on issue @@ -53,4 +53,4 @@ jobs: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | gh issue comment ${{ github.event.issue.number }} \ - --body "@${{ github.event.issue.user.login }} has been added to the approved contributors list. You can now submit PRs. Thanks for contributing!" + --body "@${{ github.event.issue.user.login }} has been vouched for and added to the contributors list. You can now submit PRs. Thanks for contributing!"