Skip to content

[CI][Doc] document GitHub e-mail privacy setting, post workflow comments on PRs - #23218

Open
KornevNikita wants to merge 4 commits into
intel:syclfrom
KornevNikita:email-check-warning
Open

KornevNikita wants to merge 4 commits into
intel:syclfrom
KornevNikita:email-check-warning

Conversation

@KornevNikita

@KornevNikita KornevNikita commented Sep 18, 2026 •

Copy link
Copy Markdown
Contributor
  1. Document the "Keep my email addresses private" GitHub setting in
    CONTRIBUTING.md, which GitHub links to when a PR is created. When a PR is
    merged, GitHub records the author of the resulting commit using the e-mail
    address from the account settings, not the one used to author the PR
    commits, so a real git config user.email alone is not enough.

  2. pr-code-format.yml writes its comments into a comments artifact, but
    nothing in this repository consumes that artifact, so the comments are never
    shown on the PR. In llvm/llvm-project the artifact is picked up by a
    privileged issue-write.yml workflow, which we don't have.
    Port issue-write.yml and the unprivileged-download-artifact composite
    action from llvm/llvm-project. Both are copied verbatim (including the
    workflows: list, so that future upstream merges stay conflict-free), the
    only change is the repository condition, which now also allows intel/llvm,
    the same way pr-code-format.yml already does.

Note that email-check.yaml uses the same artifact, so its warning about a
noreply commit author e-mail will start appearing on PRs as well.

🤖 Generated with Claude Code

KornevNikita and others added 2 commits September 18, 2026 18:20
email-check.yaml writes its warning into a `comments` artifact, but nothing
in this repo consumed that artifact, so the comment was never posted. Port
issue-write.yml and the unprivileged-download-artifact action from
llvm/llvm-project to post it, bring email-check.yaml up to its current
upstream state, and document the setting in CONTRIBUTING.md and
ContributeToDPCPP.md.

pr-code-format.yml uploads its comments through the same artifact, so the
clang-format comments, which were silently dropped for the same reason,
should start being posted on PRs as well.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Comment thread .github/workflows/issue-write.yml Dismissed
@KornevNikita

Copy link
Copy Markdown
Contributor Author

deliberately canceled win & linux pre-commit as they're no affected.

@KornevNikita
KornevNikita marked this pull request as ready for review September 18, 2026 17:16
@KornevNikita
KornevNikita requested review from a team and bader as code owners September 18, 2026 17:16
@sarnex

sarnex commented Sep 18, 2026 •

Copy link
Copy Markdown
Contributor

I think @uditagarwal97 worked on this before and if I remember correctly he determined it wasn't possible to accurately do the check with any GitHub API, maybe he can take a look here

Comment thread sycl/doc/developer/ContributeToDPCPP.md Outdated
Comment on lines +40 to +50
## Commit e-mail address

Please make sure that the e-mail address recorded in your commits is a real one
and not a GitHub `noreply` address: turn off the
[Keep my email addresses private](https://github.com/settings/emails) setting in
your GitHub account and check that your local `git config user.email` matches one
of the verified addresses of that account. Pull requests authored with a private
e-mail address are automatically flagged with a warning comment. See
[LLVM Developer Policy](https://llvm.org/docs/DeveloperPolicy.html#email-addresses)
and this [LLVM Discourse thread](https://discourse.llvm.org/t/hidden-emails-on-github-should-we-do-something-about-it)
for more information.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As per my understanding, the email address used to author a commit is different from the email address that Github will use when merging a PR. So, even if the author signed their commits but have email address private (in Github Settings), Github will still use noreply email address.
For example: in #23063, the email used to author commits is an intel email (https://github.com/intel/llvm/commit/a7d0ca457248480674293968f11b4a34ad614cb9.patch), but Github still choses to use noreply anonymous email for merging.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are Github APIs to get the email id with which commits are authored, but there is no API to get user's "Keep my email private" setting. So, the email-check workflow is not of much use, IMO.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah, you're right, thanks for the clarification. Then I'll reduce this patch to adding a note for contibutors.

Anyways, I guess we should keep .github/workflows/issue-write.yml to issue a comment about format

Comment thread CONTRIBUTING.md
GitHub records the author of a merged commit using the e-mail address from
the account settings, not the one used in the pull request commits, and
there is no API to query the "Keep my email addresses private" setting.
The email-check workflow, which only inspects the commit author e-mail,
therefore can't detect the problem, so remove it and document the setting
in CONTRIBUTING.md only.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@KornevNikita KornevNikita changed the title [CI][Doc] Warn PR authors using a GitHub private e-mail address [CI][Doc] Post workflow comments on PRs, document GitHub e-mail privacy setting Sep 25, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@KornevNikita KornevNikita changed the title [CI][Doc] Post workflow comments on PRs, document GitHub e-mail privacy setting [CI][Doc] document GitHub e-mail privacy setting, post workflow comments on PRs Sep 25, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

PR selection is incorrect and attacker-controlled artifacts can overwrite unrelated bot comments.

Get a fresh assessment by requesting another Copilot review.

Review effort: Balanced
Findings: 1 High severity · 2 Medium severity · 1 Low severity

Open (4)
What changed in this PR

Documents GitHub email privacy requirements and adds privileged workflow support for posting CI artifact comments to pull requests.

Changes:

  • Documents commit email configuration.
  • Adds artifact download composite action.
  • Adds workflow for creating or updating PR comments.
File Description
CONTRIBUTING.md Documents email privacy requirements.
.github/​workflows/​unprivileged-download-artifact/​action.yml Downloads workflow artifacts.
.github/​workflows/​issue-write.yml Posts artifact-generated comments to PRs.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment on lines +154 to +157
if (old_comment.data.user.login != "github-actions[bot]") {
console.log("Invalid comment id: " + comment.id);
return;
}
// The largest PR number is the one we care about. The only way
// to have more than one associated pull requests is if all the
// old pull requests are in the closed state.
if (pr.baseRepository.owner.login = context.repo.owner && pr.number > pr_number) {
Comment on lines +17 to +21
filename:
description: >-
The filename of the downloaded artifact or the empty string if the
artifact was not found.
value: ${{ steps.download-artifact.outputs.filename }}
run-id:
description: >-
The run-id for the workflow run that you want to download the artifact
from. If ommitted it will download the most recently created artifact

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants