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

Fix #2877, PR title not available for push/PR merge #2889

Merged
merged 1 commit into from Mar 20, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
11 changes: 3 additions & 8 deletions scripts/simple_app_benchmark_upload.py
Expand Up @@ -104,11 +104,7 @@ def insert_benchmarking_data(


def main():
"""Runs the benchmarks and inserts the results.

Raises:
ValueError: If the PR title is not provided.
"""
"""Runs the benchmarks and inserts the results."""
# Get the commit SHA and JSON directory from the command line arguments
parser = argparse.ArgumentParser(description="Run benchmarks and process results.")
parser.add_argument(
Expand Down Expand Up @@ -150,9 +146,8 @@ def main():
)
args = parser.parse_args()

pr_title = args.pr_title or os.getenv("PR_TITLE")
if not pr_title:
raise ValueError("PR title is required")
# Get the PR title from env or the args. For the PR merge or push event, there is no PR title, leaving it empty.
pr_title = args.pr_title or os.getenv("PR_TITLE", "")

# Get the results of pytest benchmarks
cleaned_benchmark_results = extract_stats_from_json(args.benchmark_json)
Expand Down