Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
Use existence of issue_reference_number flag to determine if prod
Joseph T. Lyons1737329e847d
diff --git a/.github/workflows/update_all_top_ranking_issues.yml b/.github/workflows/update_all_top_ranking_issues.ymlindex 82282058fe3..792b2878364 100644--- a/.github/workflows/update_all_top_ranking_issues.yml+++ b/.github/workflows/update_all_top_ranking_issues.yml@@ -15,4 +15,4 @@ jobs:architecture: "x64"cache: "pip"- run: pip install -r script/update_top_ranking_issues/requirements.txt- - run: python script/update_top_ranking_issues/main.py 5393 --github-token ${{ secrets.GITHUB_TOKEN }} --prod+ - run: python script/update_top_ranking_issues/main.py --github-token ${{ secrets.GITHUB_TOKEN }} --issue_reference_number 5393diff --git a/.github/workflows/update_weekly_top_ranking_issues.yml b/.github/workflows/update_weekly_top_ranking_issues.ymlindex 86ec31b3f41..feae49accf9 100644--- a/.github/workflows/update_weekly_top_ranking_issues.yml+++ b/.github/workflows/update_weekly_top_ranking_issues.yml@@ -15,4 +15,4 @@ jobs:architecture: "x64"cache: "pip"- run: pip install -r script/update_top_ranking_issues/requirements.txt- - run: python script/update_top_ranking_issues/main.py 6952 --github-token ${{ secrets.GITHUB_TOKEN }} --prod --query-day-interval 7+ - run: python script/update_top_ranking_issues/main.py --github-token ${{ secrets.GITHUB_TOKEN }} --issue_reference_number 6952 --query-day-interval 7diff --git a/script/update_top_ranking_issues/main.py b/script/update_top_ranking_issues/main.pyindex c51f3321e68..741406696e0 100644--- a/script/update_top_ranking_issues/main.py+++ b/script/update_top_ranking_issues/main.py@@ -54,14 +54,10 @@ class IssueData:@app.command()def main(- issue_reference_number: Optional[int] = None,github_token: Optional[str] = None,- prod: bool = False,+ issue_reference_number: Optional[int] = None,query_day_interval: Optional[int] = None,) -> None:- if prod and not issue_reference_number:- raise ValueError("Issue reference number must be provided in prod mode")-start_time: datetime = datetime.now()start_date: datetime | None = None@@ -97,7 +93,7 @@ def main(error_message_to_erroneous_issue_data,)- if prod:+ if issue_reference_number:top_ranking_issues_issue: Issue = repository.get_issue(issue_reference_number)top_ranking_issues_issue.edit(body=issue_text)else: