pygithub
pygithub copied to clipboard
Git and GitHub API in Python. This repo contains some examples and an article about how to sign commits automatically using GitHub Actions.
Git and GitHub API examples using Python
This repo contains some Python examples on using git and GitHub API.
Articles
- Sign automatic commits in GitHub Actions
- How to create a single commit with multiple files using GitHub API
- How to sign commits using the GitPython package
- How to create a subkey for signing
Build and run
Build docker image:
./bin/build.sh
Run all examples in src/main.py:
./bin/run-main.sh
Run examples:
./bin/run-01.sh
./bin/run-03.sh
./bin/run-04.sh
./bin/run-main.sh
NOTE: running GitHub API examples with your personal token produces not signed commits. The commit is only signed if you use the GITHUB_TOKEN provided to the running workflow.