A Python script that fetches issue details and associated comments from a specified GitHub repository and saves them to individual text files.
- Fetches issue details such as number, title, URL, and body content.
- Extracts associated comments of each issue.
- Saves each issue's details in separate text files.
- Skips specific comment text based on defined criteria.
- Python 3.x
- Libraries:
requests
,BeautifulSoup
You can install these libraries using pip:
pip install requests beautifulsoup4
- Clone the repository:
git clone https://github.com/YOUR_USERNAME/YOUR_REPO_NAME.git
cd YOUR_REPO_NAME
-
Update the
repo_owner
,repo_name
, andtoken
in the script with your desired repository details and personal access token. Ensure you have the necessary permissions to access the repository and its issues. -
Update the
PATH_TO_EXPORT_TXT_FILES
in thewriteTxt
function to specify where the generated text files should be saved.
Run the script:
python script_name.py
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
You should replace placeholders like YOUR_USERNAME
, YOUR_REPO_NAME
, and script_name.py
with actual values. Also, if you plan to add more features or require any other libraries in the future, make sure to update the README.md
accordingly.