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

Use github-refs for GitHub Actions so that branches are supported in addition to tags #28016

Open
rarkins opened this issue Mar 19, 2024 · 2 comments
Labels
manager:github-actions Github actions manager priority-3-medium Default priority, "should be done" but isn't prioritised ahead of others type:feature Feature (new functionality)

Comments

@rarkins
Copy link
Collaborator

rarkins commented Mar 19, 2024

Describe the proposed change(s).

In GitHub Actions, and also likely some other managers such as npm, references to GitHub are not limited to only tags but also branches. In shorthand this is known as "references".

We need a new datasource called github-refs which fetches git refs - including branch names - and then enriches it with tags and releases data.

After that we need to check all managers which currently reference github-tags or github-releases and see if github-refs is better.

Reproduction repo: https://github.com/renovate-reproductions/28016

@rarkins rarkins added type:feature Feature (new functionality) priority-3-medium Default priority, "should be done" but isn't prioritised ahead of others manager:github-actions Github actions manager labels Mar 19, 2024
@karlhorky
Copy link
Contributor

This would also enable support for pnpm/action-setup, which is currently not updated with the @v2, @v3 etc version recommended in the readme:

@rarkins rarkins changed the title Use github-refs for GitHub Actions Use github-refs for GitHub Actions so that branches are supported in addition to tags Sep 13, 2024
@rarkins
Copy link
Collaborator Author

rarkins commented Sep 13, 2024

Here's an example public repository refs Rest API which has a branch we're interested in (v1): https://api.github.com/repos/oracle-actions/setup-java/git/refs?per_page=100

The per_page parameter seems to work (increasing from default 30 to 100) but I haven't found a way to get them to sort by date (and nor do they include date in their response). This would would mean we have the need to fetch every page every time, to make sure our results include the latest.

This lack of (a) timestamps and (b) sorting is why we still use the GraphQL API for github-tags and github-releases datasources, so we may need to do so again here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
manager:github-actions Github actions manager priority-3-medium Default priority, "should be done" but isn't prioritised ahead of others type:feature Feature (new functionality)
Projects
None yet
Development

No branches or pull requests

2 participants