forked from PyGithub/PyGithub
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #41 from coveord/chore/merge
merged remote back with origin
- Loading branch information
Showing
1,245 changed files
with
25,411 additions
and
21,221 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
# These are supported funding model platforms | ||
|
||
github: [sfdye, s-t-e-v-e-n-k] | ||
github: [sfdye, s-t-e-v-e-n-k, enricomi] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
name: Build package | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
artifact-name: | ||
description: "Name of an artifact" | ||
type: "string" | ||
required: false | ||
default: "package" | ||
|
||
jobs: | ||
build-pkg: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set up Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.x' | ||
|
||
- name: Install dependencies | ||
run: pip install -U build twine | ||
- name: Build 📦 package | ||
run: python -m build | ||
- name: Check 📦 package | ||
run: twine check dist/* | ||
|
||
- uses: actions/upload-artifact@v3 | ||
with: | ||
name: ${{ inputs.artifact-name }} | ||
path: dist |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,36 @@ | ||
name: CI | ||
on: | ||
push: | ||
branches: master | ||
branches: | ||
- main | ||
- release-v* | ||
pull_request: | ||
merge_group: | ||
|
||
jobs: | ||
|
||
build: | ||
uses: "./.github/workflows/_build-pkg.yml" | ||
with: | ||
artifact-name: package | ||
|
||
test: | ||
runs-on: ubuntu-latest | ||
name: test (Python ${{ matrix.python-version }}) | ||
runs-on: ${{ matrix.os }} | ||
name: test (Python ${{ matrix.python-version }} on ${{ matrix.os-label }}) | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
# keep it sync with tox.ini [gh-actions] section | ||
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12-dev"] | ||
os: ["ubuntu-latest"] | ||
os-label: ["Ubuntu"] | ||
include: | ||
- {python-version: "3.8", os: "windows-latest", os-label: "Windows"} | ||
- {python-version: "3.8", os: "macos-latest", os-label: "macOS"} | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set up Python | ||
uses: actions/setup-python@v2 | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: "${{ matrix.python-version }}" | ||
- name: Install tox | ||
|
@@ -23,13 +40,24 @@ jobs: | |
- name: Run tests | ||
run: tox | ||
- name: Upload coverage to Codecov | ||
uses: codecov/[email protected] | ||
uses: codecov/codecov-action@v3 | ||
|
||
test_success: | ||
# this aggregates success state of all jobs listed in `needs` | ||
# this is the only required check to pass CI | ||
name: "Test success" | ||
runs-on: ubuntu-latest | ||
needs: [test] | ||
steps: | ||
- name: "Noop" | ||
run: true | ||
shell: bash | ||
|
||
draft: | ||
runs-on: ubuntu-latest | ||
needs: test | ||
if: github.ref == 'refs/heads/master' | ||
needs: test_success | ||
if: github.ref == 'refs/heads/main' | ||
steps: | ||
- uses: release-drafter/release-drafter@v5 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
name: Lint | ||
on: | ||
push: | ||
branches: | ||
- main | ||
- release-v* | ||
pull_request: | ||
merge_group: | ||
|
||
jobs: | ||
mypy: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set up Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: "3.x" | ||
- run: | | ||
python -m pip install --upgrade pip | ||
pip install -e . | ||
pip install -r requirements/types.txt | ||
- uses: liskin/gh-problem-matcher-wrap@v2 | ||
with: | ||
action: add | ||
linters: mypy | ||
- run: mypy --show-column-numbers github tests | ||
|
||
pre-commit: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: "3.x" | ||
- uses: pre-commit/[email protected] | ||
|
||
docs: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: "3.8" | ||
|
||
- run: pip install -r requirements/docs.txt | ||
- run: pip install -e . | ||
- run: sphinx-build doc build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,29 @@ | ||
name: Publish to PyPI | ||
on: | ||
push: | ||
tags: | ||
- "*" | ||
tags: ["*"] # this will run full workflow including publish to PyPI | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build: | ||
uses: "./.github/workflows/_build-pkg.yml" | ||
with: | ||
artifact-name: package | ||
|
||
publish: | ||
needs: [build] | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set up Python | ||
uses: actions/setup-python@v2 | ||
- uses: actions/download-artifact@v3 | ||
with: | ||
python-version: '3.x' | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install setuptools wheel twine | ||
- name: Build and publish | ||
name: package | ||
path: dist | ||
- name: Install twine | ||
run: pip install -q twine | ||
- name: Publish 📦 to PyPI | ||
# only run this for tags | ||
if: startsWith(github.event.ref, 'refs/tags/') | ||
env: | ||
TWINE_USERNAME: __token__ | ||
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} | ||
run: | | ||
python setup.py sdist bdist_wheel | ||
twine upload dist/* | ||
run: twine upload dist/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,7 +8,12 @@ | |
# Copyright 2016 Peter Buckley <[email protected]> # | ||
# Copyright 2017 Chris McBride <[email protected]> # | ||
# Copyright 2017 Colin Hoglund <[email protected]> # | ||
# Copyright 2018 Vinay Hegde <[email protected]> # | ||
# Copyright 2018 sfdye <[email protected]> # | ||
# Copyright 2020 Steve Kowalik <[email protected]> # | ||
# Copyright 2020 Wan Liuyang <[email protected]> # | ||
# Copyright 2023 Enrico Minack <[email protected]> # | ||
# Copyright 2023 Sol Redfern <[email protected]> # | ||
# # | ||
# This file is part of PyGithub. # | ||
# http://pygithub.readthedocs.io/ # | ||
|
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,40 @@ | ||
default_language_version: | ||
python: python3 | ||
|
||
repos: | ||
- repo: https://github.com/psf/black | ||
rev: 22.10.0 | ||
hooks: | ||
- id: black | ||
- repo: https://github.com/asottile/seed-isort-config | ||
rev: v2.2.0 | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v4.5.0 | ||
hooks: | ||
- id: seed-isort-config | ||
- repo: https://github.com/pre-commit/mirrors-isort | ||
rev: v5.10.1 | ||
- id: end-of-file-fixer | ||
- id: trailing-whitespace | ||
- id: check-symlinks | ||
- id: destroyed-symlinks | ||
- id: mixed-line-ending | ||
args: | ||
- "--fix=lf" | ||
|
||
- repo: https://github.com/asottile/pyupgrade | ||
rev: v3.15.0 | ||
hooks: | ||
- id: isort | ||
- repo: https://github.com/pycqa/flake8 | ||
rev: 3.9.2 | ||
- id: pyupgrade | ||
args: ["--py37-plus"] | ||
|
||
- repo: https://github.com/astral-sh/ruff-pre-commit | ||
rev: v0.1.7 | ||
hooks: | ||
- id: flake8 | ||
- id: ruff | ||
args: | ||
- "--fix" | ||
- "--fixable=ALL" | ||
- "--exit-non-zero-on-fix" | ||
|
||
- repo: https://github.com/codespell-project/codespell | ||
rev: v2.2.1 | ||
rev: v2.2.6 | ||
hooks: | ||
- id: codespell | ||
exclude: tests/ | ||
args: | ||
- --ignore-words-list="bloaded,nto,pullrequest,pullrequests,thi,tim,wan,Wan,chang,Chang" | ||
- --quiet-level=2 | ||
- repo: https://github.com/asottile/pyupgrade | ||
rev: v3.1.0 | ||
additional_dependencies: [tomli] | ||
|
||
- repo: https://github.com/psf/black | ||
rev: 23.12.0 | ||
hooks: | ||
- id: pyupgrade | ||
args: | ||
- --py37-plus | ||
- id: black |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.