on:
  schedule:
    - cron: "0 */12 * * *"
  workflow_dispatch:

jobs:
  update_top_ranking_issues:
    runs-on: ubuntu-latest
    if: github.repository_owner == 'zed-industries'
    steps:
      - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
      - uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 # v5
        with:
          python-version: "3.11"
          architecture: "x64"
          cache: "pip"
      - run: pip install -r script/update_top_ranking_issues/requirements.txt
      - run: python script/update_top_ranking_issues/main.py --github-token ${{ secrets.GITHUB_TOKEN }} --issue-reference-number 5393
