Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/basemax/get-github-issues
A Python script to get a list of all open issues in a repository with specific labels, and fetch their corresponding bodies and comments in chronological order (oldest to newest).
https://github.com/basemax/get-github-issues
github github-api github-api-python github-api-v3 github-issue githubpy issue issues py py-github pygithub python python3
Last synced: about 23 hours ago
JSON representation
A Python script to get a list of all open issues in a repository with specific labels, and fetch their corresponding bodies and comments in chronological order (oldest to newest).
- Host: GitHub
- URL: https://github.com/basemax/get-github-issues
- Owner: BaseMax
- License: gpl-3.0
- Created: 2023-04-21T06:47:30.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-07-06T00:32:01.000Z (7 months ago)
- Last Synced: 2025-02-04T07:15:38.520Z (6 days ago)
- Topics: github, github-api, github-api-python, github-api-v3, github-issue, githubpy, issue, issues, py, py-github, pygithub, python, python3
- Language: Python
- Homepage:
- Size: 55.7 KB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 8
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Get GitHub Issues
A Python script to get a list of all open issues in a repository with specific labels, and fetch their corresponding bodies and comments in chronological order (oldest to newest).
## Prerequisites
- Python 3.x
- GitHub Personal Access Token: https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token## Installation
Clone the repository:
```bash
git clone https://github.com/BaseMax/get-github-issues.git
cd get-github-issues
```Create an virtual envirement:
```console
python -m venv venv
```Install the dependencies:
```bash
pip install -r requirements.txt
```At last run activate binary file to enable virtual envirenment:
```console
source venv/bin/activate
```## Usage
Set the ACCESS_TOKEN (GitHub Personal Access Token) variable inside `.env` file:
Or
```bash
export ACCESS_TOKEN=YOUR_TOKEN_HERE
```Run the script:
```bash
python script.py
```Replace with the name of the repository owner, with the name of the repository, and with a comma-separated list of labels you want to filter by. For example:
```bash
python get-github-issues.py BaseMax get-github-issues "bug,enhancement"
```
This will fetch all open issues in the BaseMax/get-github-issues repository with the labels "bug" or "enhancement".## License
This project is licensed under the GPL-3.0 License - see the LICENSE file for details.
## Acknowledgments
- GitHub REST API v3
- python-dotenv## Contributing
Contributions are welcome! Please open an issue or submit a pull request.
Copyright 2023, Max Base