.github/workflows: Add email validator workflow
This workflow validates that all commits in a pull request use email addresses ending in @scylladb.com. For each commit with an author or committer email that doesn't match this pattern, the workflow automatically adds a comment to the pull request with a warning. This serves two purposes: 1. Alert maintainers when external contributors submit code (which is acceptable, but good to be aware of) 2. Help ScyllaDB developers catch cases where they haven't configured their git email correctly When a non-@scylladb.com email is detected, the workflow posts this comment on the pull request: ``` ⚠️ Non-@scylladb.com Email Addresses Detected Found commit(s) with author or committer emails that don't end with @scylladb.com. This indicates either: - An external contributor (acceptable, but maintainer should be aware) - A developer who hasn't configured their git email correctly For ScyllaDB developers: If you're a ScyllaDB employee, please configure your git email globally: git config --global user.email "your.name@scylladb.com" If only your most recent commit is invalid, you can amend it: git commit --amend --reset-author --no-edit git push --force If you have multiple invalid commits, you need to rewrite them all: git rebase -i <base-commit> # Mark each invalid commit as 'edit', then for each: git commit --amend --reset-author --no-edit git rebase --continue # Repeat for each invalid commit git push --force ``` Fixes: https://scylladb.atlassian.net/browse/RELENG-35 Closes scylladb/scylladb#27796
This commit is contained in:
13
.github/workflows/call_validate_pr_author_email.yml
vendored
Normal file
13
.github/workflows/call_validate_pr_author_email.yml
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
name: validate_pr_author_email
|
||||
|
||||
on:
|
||||
pull_request_target:
|
||||
types:
|
||||
- opened
|
||||
- synchronize
|
||||
- reopened
|
||||
|
||||
jobs:
|
||||
validate_pr_author_email:
|
||||
uses: scylladb/github-automation/.github/workflows/validate_pr_author_email.yml@main
|
||||
|
||||
Reference in New Issue
Block a user