1 name: "Check for private emails used in PRs"
13 runs-on: ubuntu-latest
14 if: github.repository == 'llvm/llvm-project'
16 - name: Fetch LLVM sources
17 uses: actions/checkout@v4
19 ref: ${{ github.event.pull_request.head.sha }}
21 - name: Extract author email
25 echo "EMAIL=$(git show -s --format='%ae' HEAD~0)" >> $GITHUB_OUTPUT
26 # Create empty comment file
29 - name: Validate author email
30 if: ${{ endsWith(steps.author.outputs.EMAIL, 'noreply.github.com') }}
33 ⚠️ We detected that you are using a GitHub private e-mail address to contribute to the repo.<br/>
34 Please turn off [Keep my email addresses private](https://github.com/settings/emails) setting in your account.<br/>
35 See [LLVM Discourse](https://discourse.llvm.org/t/hidden-emails-on-github-should-we-do-something-about-it) for more information.
38 [{"body" : "$COMMENT"}]
41 - uses: actions/upload-artifact@26f96dfa697d77e81fd5907df203aa23a56210a8 #v4.3.0