Skip to content

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

Notifications You must be signed in to change notification settings

nautilus-cyberneering/pygithub

Folders and files

NameName
Last commit message
Last commit date

Latest commit

52f842a · Apr 29, 2022
Apr 29, 2022
Nov 25, 2021
Nov 5, 2021
Jan 14, 2022
Nov 29, 2021
Nov 29, 2021
Nov 1, 2021
Nov 25, 2021
Nov 23, 2021
Nov 29, 2021
Jan 14, 2022
Nov 23, 2021
Nov 25, 2021

Repository files navigation

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.