Add automated submission review, email approvals, and English README - #41
Merged
Merged
Conversation
maoawa
marked this pull request as ready for review
September 23, 2026 19:34
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This adds format validation and a maintained bot comment for domain-submission PRs. Passing submissions are emailed with the applicant, description, discussion, domain, DNS records, and contact details. Private, expiring links open a small dark no-JavaScript page where a maintainer can approve and merge the checked revision or decline with a polite English/Chinese message containing the selected preset reason and any additional note as written.
The service uses Cloudflare Workers, D1, and native email to a verified destination. An organization-owned GitHub App provides repository-scoped installation tokens. The privileged workflow executes trusted base code only; the Worker independently validates changes and uses conditional D1 writes to prevent repeated decisions. GET requests never mutate GitHub. Failed or stale checks block merging, and ambiguous email/decision failures require manual recovery.
English README and Chinese/English contribution instructions are included. Ordinary GitHub commit messages are accepted; applicants do not need a special commit convention. Links and configuration target moepage/subdomain after the repository transfer.
Validation: 11 Node tests and 23 Workers-runtime tests pass; the Worker dry-run build passes. All 29 existing records were read successfully through the real GitHub batched API. The deployed Worker authenticated with the installed App and rejected this draft maintenance PR as expected. Cloudflare accepted a separate synthetic demo email, and both demo forms responded successfully. No applicant PR was modified during testing. Apple Watch inbox/form confirmation is pending.
Deployment: the production Worker is configured at https://moe-page.marsinside.com on the Free plan, with D1 and Actions secrets/URL configured. The review workflow activates once this PR is merged.
Human decisions credit @maoawa in bilingual review messages. Squash merges add maoawa using a GitHub no-reply co-author trailer while preserving the submitted commit authors and existing co-author trailers. The installed App is now named moepage-review; its bot remains the API actor. The automated format comment names maoawa as the review contact without implying a human has approved it. The maintainer successfully tested the demo form on Apple Watch.