davidbrusius / pygithub

Git and GitHub API in Python. This repo contains some examples and an article about how to sign commits automatically using GitHub Actions.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Git and GitHub API examples using Python

Example 01 Example 02 Example 03 Example 04 Example 05

This repo contains some Python examples on using git and GitHub API.

Articles

  1. Sign automatic commits in GitHub Actions
  2. How to create a single commit with multiple files using GitHub API
  3. How to sign commits using the GitPython package
  4. 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.

About

Git and GitHub API in Python. This repo contains some examples and an article about how to sign commits automatically using GitHub Actions.


Languages

Language:Python 89.8%Language:Shell 5.8%Language:Dockerfile 4.3%