kiliczsh / github-tag-checker

This is a simple script that checks if a GitHub release tag exists. It gathers tags in a format to be used.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

GitHub Tag Checker

This is a simple script that checks if a GitHub release tag exists. It gathers tags in a format to be used.

Usage

Create a virtual environment and install the requirements.

$ python3 -m venv venv
$ source venv/bin/activate
$ pip install -r requirements.txt

Run the script with the repository name, per page and tag limit as arguments.

$ export GITHUB_TOKEN="YOUR_PERSONAL_ACCESS_TOKEN"
$ python main.py LimeSurvey/LimeSurvey 100 1000 /tmp/limesurvey/releases
# 100 tags per page, 1000 tags limit default values are 10 and -1 respectively if not provided, -1 means no limit.
# The 4th argument is the directory to extract the tag files, default value is the current directory.

Replace LimeSurvey/LimeSurvey with the repository you want to check.

Sample Data

The following is a sample of the data that is returned for the following command.

$ python main.py LimeSurvey/LimeSurvey 100 > limesurvey.json
[
    {
        "name": "5.6.12+230327",
        "date": 1679907465,
        "sha": "90f4efdd9912fadc733aad426524775c70b7d901",
        "zipball_url": "https://api.github.com/repos/LimeSurvey/LimeSurvey/zipball/refs/tags/5.6.12+230327",
        "tarball_url": "https://api.github.com/repos/LimeSurvey/LimeSurvey/tarball/refs/tags/5.6.12+230327"
    },
    ...
]

About

This is a simple script that checks if a GitHub release tag exists. It gathers tags in a format to be used.


Languages

Language:Python 100.0%