A Python script to export merged pull requests assigned to a user within a specified time period.
- Copy
.env.exampleto.envand populate it with the required values. - Initialize the virtual environment by running
uv sync.
- Run the following command to collect merged pull requests for the first quarter of 2025:
uv run python scripts/collect_pull_requests.py --repository orga/repo --start-date 2025-01-01 --end-date 2025-03-31- The exported pull requests will be available in the data directory.
- Activate the virtual environment:
source .venv/bin/activate- Execute the script:
python scripts/collect_pull_requests.py --repository orga/repo --start-date 2025-01-01 --end-date 2025-03-31-
Retrieve the exported PRs from the
datadirectory. -
To run the script with a specific user, use the
--userflag:
python scripts/collect_pull_requests.py --repository orga/repo --start-date 2025-01-01 --end-date 2025-03-31 --user <username>- To convert the
.mdfile to.pdf, use the command:
ppandoc data/PRs_<REPO>_<START-DATE>_<END-DATE>.md -o data/PRs_<REPO>_<START-DATE>_<END-DATE>.pdf --pdf-engine=xelatexRun the test suite in virtual env with:
pytest tests/This project is licensed under GNU General Public License v3.0. See the LICENSE file for details.
- Add CI/CD pipeline for automated testing and deployment.
- Enhance tests to cover more cases.