[llvm] Add github workflow that checks if a private email address was used to contribute to the repo and warn in this case (PR #80514)

David Spickett via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 5 01:19:31 PST 2024


================
@@ -0,0 +1,40 @@
+name: "Check for private emails used in PRs"
+
+on: pull_request_target
+
+permissions:
+  contents: read
+
+jobs:
+  validate_email:
+    permissions:
+      pull-requests: write
+    runs-on: ubuntu-latest
+    if: github.repository == 'llvm/llvm-project'
+    steps:
+      - name: Fetch LLVM sources
+        uses: actions/checkout at v4
+        with:
+          ref: ${{ github.event.pull_request.head.sha }}
----------------
DavidSpickett wrote:

There is `user.email` in https://docs.github.com/en/webhooks/webhook-events-and-payloads#pull_request. Would need testing to confirm, but I'd guess that checking for null or `noreply at github...` in the string would work.

And possibly this could all be done in the YAML. Which is not necessarily a good thing so you don't have to change what you've got.

Just know that this is (allegedly) an option.

https://github.com/llvm/llvm-project/pull/80514


More information about the llvm-commits mailing list