Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ci] encode token in the same way as e-mail address for RHub #3920

Merged
merged 4 commits into from
Feb 7, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 11 additions & 3 deletions .ci/run_rhub_solaris_checks.R
Original file line number Diff line number Diff line change
Expand Up @@ -9,22 +9,30 @@ email <- c(
150L, 147L, 145L, 146L, 158L, 145L, 140L, 151L, 137L, 156L, 146L, 159L, 140L, 137L, 141L, 146L,
143L, 141L, 149L, 157L, 106L, 163L, 153L, 154L, 151L, 139L, 147L, 150L, 88L, 141L, 153L, 151L
)
rhub::validate_email(
email = intToUtf8(email - 42L)
, token = "181dd96184924f0aaea19d73f9ae7974"
token <- c(
91L, 98L, 91L, 142L, 142L, 99L, 96L, 91L, 98L, 94L, 99L, 92L, 94L, 144L, 90L, 139L,
139L, 143L, 139L, 91L, 99L, 142L, 97L, 93L, 144L, 99L, 139L, 143L, 97L, 99L, 97L, 94L
)

if (Sys.info()["sysname"] == "Windows") {
null_file <- "NUL"
} else {
null_file <- "/dev/null"
}

sink(file = null_file)
rhub::validate_email(
email = intToUtf8(email - 42L)
, token = intToUtf8(token - 42L)
)
sink()
Comment on lines 23 to +28
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Prevent e-mail is being printed in logs. I believe that bots can also parse logs for e-mails printed in pain text.

image

Copy link
Collaborator

Choose a reason for hiding this comment

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

ooo good catch, didn't think about that


checks_succeeded <- TRUE
platforms <- c(
"solaris-x86-patched"
, "solaris-x86-patched-ods"
)
sink(file = null_file)
for (platform in platforms) {
res_object <- rhub::check(
path = package_tarball
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/r_solaris.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ jobs:
while IFS= read -r line; do
platform=${line%@*}
url=${line#*@}
body="${body}${platform}: ${url}\r\n"
body="${body}**${platform}**: ${url}\r\n"
done < "$GITHUB_WORKSPACE/rhub_logs.txt" || true
body="${body}Reports also have been sent to LightGBM public e-mail: http://www.yopmail.com/lightgbm_rhub_checks\r\n"
body="${body}Status: ${{ job.status }}."
Expand Down