Visitar URL original
Allow a filter option to Repository.get_releases() · Issue #3549 · PyGithub/PyGithub · GitHub
Skip to content

Allow a filter option to Repository.get_releases() #3549

Open

Description

@moijes12

Use Case

As a user of the PyGithub API, I wan't to be able to filter the releases of a given repository by various options like:

  • Time since released
  • Version

For example, if I want to see all releases of a repository after 1 July 2026, I have to do something like the below

github = Github(auth={})  # Initialize using token
repo = github.get_repo("owner/repo")
releases = repo.get_releases()
for release in releases:
    if release.published_at < some_cutoff_date
.....

I want to be able to do the below

github = Github(auth={})  # Initialize using token
repo = github.get_repo("owner/repo")
releases = repo.get_releases(start_date=cutoff_date)

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions