Skip to content

Conversation

@agriyakhetarpal
Copy link
Member

Description

Tip

This change has been made on top of the changes in #261, but is more or less separate from them.

This pull request adds support in the repo-review web app for both branches and tags as refs when selecting a GitHub repository to run the tool on.

Changes made

  • Added GitHub API integration to fetch both branches and tags for selected repositories
  • The URL parameter handling has been modified to track the reference type. The branches are shown first in the autocomplete dropdown, and tags come later.
  • A fallback has been included for common branches when API requests fail (main/develop/stable/etc.)

@agriyakhetarpal agriyakhetarpal changed the title feat: (web app) support both branches and tags in the reference selector feat: [web app] support both branches and tags in the reference selector Feb 27, 2025
@agriyakhetarpal
Copy link
Member Author

Question: are there tests for the web app currently? I don't see any at the moment – though I've tested the changes locally, of course.

@henryiii henryiii merged commit 1a2eecc into scientific-python:main Feb 27, 2025
9 checks passed
@henryiii
Copy link
Collaborator

Thanks! No, no tests ATM. Ideas welcome.

@henryiii
Copy link
Collaborator

The main branch is not on top, would that be possible?

@agriyakhetarpal
Copy link
Member Author

Thanks! No, no tests ATM. Ideas welcome.

It is a tricky case. I would say we shouldn't over-complicate anything – if sp-repo-review and its dependencies work inside a pyodide venv for a simple repository, that should be fine for a start as an integration test of sorts. UI tests with a Selenium runner can come later.

The main branch is not on top, would that be possible?

Yes, I think so. We can have main, stable, and friends show up at the top; the entries are sorted based on how we receive them from GitHub's API and we can treat them as special cases.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants