Skip to content

Commit

Permalink
Dedup bloat reports using title without the parent sha (#3466)
Browse files Browse the repository at this point in the history
  • Loading branch information
andy31415 authored and pull[bot] committed Nov 3, 2020
1 parent ad7c11f commit 2378105
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions scripts/helpers/bloat_check.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ def sendFileAsPrComment(job_name, filename, gh_token, gh_repo, gh_pr_number,
rawText = open(filename, 'rt').read()

# a consistent title to help identify obsolete comments
titleHeading = 'Size increase report for "{jobName}" from {baseSha}'.format(jobName=job_name, baseSha=base_sha)
titleHeading = 'Size increase report for "{jobName}"'.format(jobName=job_name)

api = github.Github(gh_token)
repo = api.get_repo(gh_repo)
Expand All @@ -175,7 +175,7 @@ def sendFileAsPrComment(job_name, filename, gh_token, gh_repo, gh_pr_number,
change.vmChange)

# NOTE: PRs are issues with attached patches, hence the API naming
pull.create_issue_comment("""{title}
pull.create_issue_comment("""{title} from {baseSha}
{table}
Expand All @@ -187,7 +187,7 @@ def sendFileAsPrComment(job_name, filename, gh_token, gh_repo, gh_pr_number,
```
</details>
""".format(title=titleHeading, table=compareTable, rawReportText=rawText))
""".format(title=titleHeading, baseSha=base_sha, table=compareTable, rawReportText=rawText))


def getPullRequestBaseSha(githubToken, githubRepo, pullRequestNumber):
Expand Down

0 comments on commit 2378105

Please sign in to comment.