[DebugInfo] Fully implement DWARF issue 180201.1 #50251
Workflow file for this run
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
| name: "Check for private emails used in PRs" | |
| on: | |
| pull_request: | |
| types: | |
| - opened | |
| permissions: | |
| contents: read | |
| jobs: | |
| validate_email: | |
| runs-on: ubuntu-24.04 | |
| if: github.repository == 'llvm/llvm-project' | |
| steps: | |
| - name: Fetch LLVM sources | |
| uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
| with: | |
| ref: ${{ github.event.pull_request.head.sha }} | |
| - name: Extract author email | |
| id: author | |
| env: | |
| GH_TOKEN: ${{ github.token }} | |
| run: | | |
| # Use Github GraphQL APIs to get the email associated with the PR author because this takes into account the GitHub settings for email privacy. | |
| query=' | |
| query($login: String!) { | |
| user(login: $login) { | |
| } | |
| }' | |
| PR_AUTHOR=${{ github.event.pull_request.user.login }} | |
| email=$(gh api graphql -f login="$PR_AUTHOR" -f query="$query" --jq '.data.user.email') | |
| echo "EMAIL_AUTHOR_GH_UI=$email" >> "$GITHUB_OUTPUT" | |
| # Create empty comment file | |
| echo "[]" > comments | |
| # When EMAIL_AUTHOR_GH_UI is NULL, author's email is hidden in GitHub UI. | |
| # In this case, we warn the user to turn off "Keep my email addresses private" | |
| # setting in their account. | |
| - name: Validate author email | |
| if: ${{ steps.author.outputs.EMAIL_AUTHOR_GH_UI == '' }} | |
| env: | |
| COMMENT: >- | |
| ⚠️ We detected that you are using a GitHub private e-mail address to contribute to the repo.<br/> | |
| Please turn off [Keep my email addresses private](https://github.com/settings/emails) setting in your account.<br/> | |
| See [LLVM Developer Policy](https://llvm.org/docs/DeveloperPolicy.html#email-addresses) and | |
| [LLVM Discourse](https://discourse.llvm.org/t/hidden-emails-on-github-should-we-do-something-about-it) for more information. | |
| run: | | |
| cat << EOF > comments | |
| [{"body" : "$COMMENT"}] | |
| EOF | |
| - uses: actions/upload-artifact@26f96dfa697d77e81fd5907df203aa23a56210a8 #v4.3.0 | |
| if: always() | |
| with: | |
| name: workflow-args | |
| path: | | |
| comments |