Skip to content

Commit

Permalink
removes the stacktrace from flaky test comments (#3672)
Browse files Browse the repository at this point in the history
<!-- Write **BELOW** The Headers and **ABOVE** The comments else it may
not be viewable. -->
<!-- You can view Contributing.MD for a detailed description of the pull
request process. -->

## About The Pull Request
They can be way 2 big. See atmos failure for example
<!-- Describe The Pull Request. Please be sure every change is
documented or this can delay review and even discourage maintainers from
merging your PR! -->

## Why It's Good For The Game

<!-- Please add a short description of why you think these changes would
benefit the game. If you can't justify it in words, it might not be
worth adding. -->

## Changelog

:cl:
code: flaky test github comments dont spam
/:cl:

<!-- Both :cl:'s are required for the changelog to work! You can put
your name to the right of the first :cl: if you want to overwrite your
GitHub username as author ingame. -->
<!-- You can use multiple of the same prefix (they're only used for the
icon ingame) and delete the unneeded ones. Despite some of the tags,
changelogs should generally represent how a player might be affected by
the changes rather than a summary of the PR's contents. -->
  • Loading branch information
FalloutFalcon authored Nov 3, 2024
1 parent 28e1440 commit 38c10cd
Showing 1 changed file with 2 additions and 17 deletions.
19 changes: 2 additions & 17 deletions tools/pull_request_hooks/rerunFlakyTests.js
Original file line number Diff line number Diff line change
Expand Up @@ -242,22 +242,8 @@ function createBody({ title, failures }, runUrl) {
`.replace(/^\s*/gm, "");
}

function createComment(failures, runUrl) {
return `
Flaky tests were detected again in [this test run](${runUrl}).
Failures:
\`\`\`
${failures
.map(
(failure) =>
`${failure.group}: ${
failure.headline
}\n\t${failure.details.join("\n")}`
)
.join("\n")}
\`\`\`
`.replace(/^\s*/gm, "");
function createComment(runUrl) {
return `Flaky tests were detected again in [this test run](${runUrl}).`;
}

export async function reportFlakyTests({ github, context }) {
Expand Down Expand Up @@ -304,7 +290,6 @@ export async function reportFlakyTests({ github, context }) {
repo: context.repo.repo,
issue_number: existingIssueId,
body: createComment(
details.failures,
`https://github.com/${context.repo.owner}/${
context.repo.repo
}/actions/runs/${
Expand Down

0 comments on commit 38c10cd

Please sign in to comment.