Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

merged remote back with origin #41

Merged
merged 210 commits into from
Feb 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
210 commits
Select commit Hold shift + click to select a range
a343100
Fix GithubIntegration using exiring jwt (#2460)
EnricoMi May 5, 2023
4198dbf
Add parameters to Repository.get_workflow_runs (#2408)
Felixoid May 6, 2023
5aa544a
Add support for Issue.state_reason #2370 (#2392)
chouetz May 8, 2023
bab4180
Add allow_update_branch option to Organization (#2465)
Mr-Pepe May 8, 2023
e296dbd
Add missing attributes to Branch (#2512)
kang-makes May 9, 2023
297317b
Add missing fields from `GithubCredentials.py` to CONTRIBUTING.md (#2…
JLLeitschuh May 9, 2023
600217f
Fixes issue #2521 (#2529)
amnuts May 12, 2023
17cd0b7
Raise error on unsupported redirects, log supported redirects (#2524)
EnricoMi May 13, 2023
4fa0a5f
fix: `Repository.get_artifact()` missing argument `artifact_id` (#2458)
trim21 May 13, 2023
8c4b946
Add allow_auto_merge support to Repository (#2477)
BradChengIRESS May 18, 2023
c2f12bd
Add example for Pull Request comments to documentation (#2390)
chouetz May 23, 2023
49b3ae1
Add `generate_release_notes` parameter to `create_git_release` and `c…
WojciechBarczynski May 23, 2023
03a2f69
Merge GithubException.pyi stubs back to source (#2464)
trim21 May 23, 2023
a485451
Add query `check_suite_id` integer to `Workflow.get_runs` (#2466)
trim21 May 23, 2023
8e8cfb3
merge AppAuthentication.pyi to source (#2519)
trim21 May 23, 2023
e8075c4
add `ref` to Deployment (#2489)
nevins-b May 23, 2023
b94a83c
Add new `create_fork` arguments (#2493)
JLLeitschuh May 23, 2023
f82ad61
Fix broken urls in docstrings (#2393)
Muscaw Jun 1, 2023
1081638
Add `name`, `display_title` and `path` attributes to `WorkflowRun` (#…
nuang-ee Jun 1, 2023
9f52e94
Add `name` filter to `Repository.get_artifacts()` (#2459)
trim21 Jun 1, 2023
217d424
Merging 1.58.x patch release notes into master (#2525)
EnricoMi Jun 1, 2023
a8e7c42
Add sort order and direction for getting comments (#2544)
EnricoMi Jun 7, 2023
fc2d0e1
Add authentication classes, move auth logic there (#2528)
EnricoMi Jun 8, 2023
84912a6
Make `MainClass.get_app` return completed `GithubApp` when slug is gi…
EnricoMi Jun 8, 2023
daf62bd
Add support for new RepositoryAdvisories API :tada: (#2483)
JLLeitschuh Jun 9, 2023
6407512
Fix auth issues with `Installation.get_repos` (#2547)
EnricoMi Jun 13, 2023
7be3f76
Make Requester.__createException robust against missing message and b…
EnricoMi Jun 13, 2023
0384e2f
Add support for environments (#2223)
alson Jun 13, 2023
f291a36
Implement `AppUserAuth` for Github App user tokens (#2546)
EnricoMi Jun 14, 2023
52fc107
[CI] Moving linting into separate workflow (#2522)
trim21 Jun 14, 2023
6a21761
Allow multiline comments in PullRequest (#2540)
heitorpolidoro Jun 15, 2023
6d4b6d1
Add support for get_app() with App authentication (#2549)
chantra Jun 16, 2023
b6258f4
merge GithubObject.pyi/Requester.pyi stubs back to source (#2463)
trim21 Jun 16, 2023
cb50dec
Merge PaginatedList.pyi back to source (#2555)
trim21 Jun 20, 2023
804c310
Add support for workflow jobs and steps (#1951)
Tenzer Jun 20, 2023
517ad33
Add Webhook Deliveries (#2508)
jmgreg31 Jun 20, 2023
006766f
Link to stable docs, update introduction in package used by pypi, mov…
EnricoMi Jun 20, 2023
f4e9dcb
Update MAINTAINERS (#2545)
JLLeitschuh Jun 20, 2023
ea45237
Sync GithubIntegration __init__ arguments with github.Github (#2556)
EnricoMi Jun 21, 2023
d514222
Add type stub for MainClass.get_project_column (#2502)
Railslide Jun 21, 2023
ff3b80f
Test and fix UTC issue with AppInstallationAuth (#2561)
EnricoMi Jun 22, 2023
14ae2ca
Release 1.59.0 (#2563)
EnricoMi Jun 22, 2023
e66c163
Move to main default branch (#2566)
EnricoMi Jun 22, 2023
3bb4e90
Merge `Artifact` type stub back to source (#2553)
trim21 Jun 26, 2023
094538e
Force Unix EOL (#2573)
trim21 Jun 27, 2023
0bb72ca
Retry retryable 403 (rate limit) (#2387)
EnricoMi Jun 28, 2023
9915580
Throttle requests to mitigate RateLimitExceededExceptions (#2145)
EnricoMi Jun 28, 2023
0177f7c
Make datetime objects timezone-aware (#2565)
EnricoMi Jun 28, 2023
c5542a6
Fix `Branch.bypass_pull_request_allowances` failing with "nil is not …
ThomasDevoogdt Jun 30, 2023
b41dd62
Add myself to funding (#2585)
EnricoMi Jun 30, 2023
8d3b905
Remove symlinks from test data (#2588)
trim21 Jun 30, 2023
bc68626
Publish version 2.0.0 (#2583)
EnricoMi Jul 4, 2023
5c60089
Test on Windows and macOS, don't fail fast (#2590)
EnricoMi Jul 4, 2023
11bb6bd
precommit: move `flake8` as last (#2595)
Borda Jul 4, 2023
7324110
CI: Make pytest color logs (#2597)
Borda Jul 4, 2023
c568248
Merge `Branch` type stubs back to source (#2571)
trim21 Jul 4, 2023
c4c2e52
Add github.Rate.used field (#2531)
yurinnick Jul 4, 2023
72840de
Add more methods and attributes to Repository.pyi (#2581)
Mr-Pepe Jul 4, 2023
2e5cd31
CI: Update action actions/setup-python (#2382)
cclauss Jul 4, 2023
f6e6af6
Merge `ApplicationOAuth.pyi` back to source (#2569)
trim21 Jul 5, 2023
50e26d5
Merge `WorkflowRun` type stub back to source (#2554)
trim21 Jul 5, 2023
5fcb0c7
Use `typing_extensions` for `TypedDict` (#2592)
trim21 Jul 6, 2023
950a694
Use timezone-aware reset datetime in GithubRetry.py (#2610)
soulcheck Jul 7, 2023
e306a32
Merge `Issue.pyi` back to source (#2568)
trim21 Jul 7, 2023
3c880e7
CI: Build and check package before release (#2593)
Borda Jul 7, 2023
766df99
Add missing arguments to Workflow.get_runs() (#2346)
thburghout Jul 7, 2023
91b3f40
Add support for repo and org level actions variables (#2580)
nthings Jul 7, 2023
f087cad
Add `message` property to `GithubException` (#2591)
trim21 Jul 8, 2023
61f9ae6
Merge some simple classes' type stubs back to source (#2576)
trim21 Jul 8, 2023
8bdfc3a
Merge some simple class' type stubs back to source (#2570)
trim21 Jul 11, 2023
de80ff4
Add retry issue to GithubException, don't log it (#2611)
EnricoMi Jul 11, 2023
13e178a
Set line length to 120 characters (#2599)
Borda Jul 13, 2023
8816889
Enable mypy `check_untyped_defs` (#2607)
trim21 Jul 14, 2023
294c0cc
Enable mypy `disallow_untyped_defs` (#2609)
trim21 Jul 14, 2023
1511226
Merge Path type stub back to source (#2639)
trim21 Jul 18, 2023
f259db9
Merge `AuthenticatedUser` type stubs back to source (#2577)
trim21 Jul 18, 2023
2edc0f8
Unify requirements files location & source in setup.py (#2598)
Borda Jul 18, 2023
7a80fad
Add required_linear_history attribute to BranchProtection (#2643)
EnricoMi Jul 18, 2023
cb92c7b
Merge `CheckRun` type stub back to source (#2605)
trim21 Jul 18, 2023
0779bf3
Merge `CheckSuite` type stub back to source (#2606)
trim21 Jul 18, 2023
80ae3f3
Merge `Code*` type stub back to source (#2615)
trim21 Jul 18, 2023
16180f9
Merge `Commit.pyi` back to source (#2616)
trim21 Jul 18, 2023
9989b11
Merge type stub bask to source: `Comparison` `CommitStatus` `CommitCo…
trim21 Jul 18, 2023
1d637e4
CI: label PRs that have conflicts (#2622)
Borda Jul 18, 2023
c5c83eb
CI: update labels action name and version (#2654)
Borda Jul 19, 2023
42c3b47
Replace `flake8` with `ruff` (#2617)
Borda Jul 19, 2023
ff0f31c
CI: Increase wait and retries of labels action (#2670)
Borda Jul 21, 2023
4933459
Fix assertion for subject_type in creating pull request review commen…
vanya20074 Jul 21, 2023
48d2009
CI: Improve ruff DX (#2667)
trim21 Jul 21, 2023
1922ea6
Safely coerce responseHeaders to int (#2697)
adosibalo Aug 3, 2023
e735972
Update `add_attribute.py` to latest conding style (#2631)
trim21 Aug 9, 2023
aedfa0b
Add Autolink API link (#2632)
trim21 Aug 9, 2023
d02ef22
CommitComment (#2634)
trim21 Aug 9, 2023
1af9264
Merge ContentFile type stub back to source (#2635)
trim21 Aug 9, 2023
971c4a2
Merge Plan type stub back to source (#2637)
trim21 Aug 9, 2023
7cfa476
Merge `StatsCodeFrequency` type stub back to source (#2638)
trim21 Aug 9, 2023
bcca758
Add Secret and Variable classes (#2623)
Aug 10, 2023
eadc241
Search Workflows by Name (#2711)
armartirosyan Aug 17, 2023
a7bfdf2
Adding feature for enterprise consumed license (#2626)
YugoHino Aug 17, 2023
bc9e829
Merge `Referrer` type stub back to source (#2645)
trim21 Aug 17, 2023
22c208a
Merge `RequiredStatusChecks` type stub back to source (#2647)
trim21 Aug 17, 2023
09025b9
Merge `Permissions` type stub back to source (#2648)
trim21 Aug 17, 2023
36d55aa
Merge some type stub back to source (#2650)
trim21 Aug 17, 2023
c13395a
Merge `PullRequestMergeStatus` type stub back to source (#2646)
trim21 Aug 18, 2023
99fb022
Merge `Installation` type stub back to source (#2649)
trim21 Aug 18, 2023
d7b02f9
Merge `Label` type stub back to source (#2652)
trim21 Aug 18, 2023
05c48c7
Merge `RepositoryKey` type stub back to source (#2656)
trim21 Aug 18, 2023
4622cb8
Merge `File` type stub back to source (#2658)
trim21 Aug 18, 2023
2c8b596
Merge `License` type stub back to source (#2659)
trim21 Aug 18, 2023
42dcc02
Merge `Topic` type stub back to source (#2661)
trim21 Aug 18, 2023
d93d35e
Merge `SourceImport` type stub back to source (#2663)
trim21 Aug 18, 2023
2cc1ba2
Fix pip install command in README.md (#2731)
Skptak Aug 21, 2023
95d8b83
CI: remove conflict label workflow (#2669)
trim21 Aug 21, 2023
9a88b6b
Run CI on release branches (#2708)
EnricoMi Aug 28, 2023
2fa568b
Fix assertion creating pull request review comment (#2641)
EnricoMi Aug 28, 2023
8bf542a
Pass Requester arguments to `AppInstallationAuth.__integration` (#2695)
EnricoMi Aug 28, 2023
a91debf
Make CI support merge queue (#2644)
EnricoMi Aug 28, 2023
54f2226
fix required_conversation_resolution assertion (#2715)
terenho Aug 28, 2023
ac36f6a
Suppress `requests` fallback to netrc, provide `github.Auth.Netrc` (#…
EnricoMi Aug 28, 2023
a972be2
Merge `Gist` type stub back to source (#2655)
trim21 Aug 30, 2023
356022d
Merge `GistComment` type stub back to source (#2657)
trim21 Aug 30, 2023
a04c1c2
Merge `Event` type stub back to source (#2660)
trim21 Aug 30, 2023
e5cb726
Merge `PullRequestReview` type stub back to source (#2662)
trim21 Aug 30, 2023
1676f1d
Merge `TimelineEvent` type stub back to source (#2664)
trim21 Aug 30, 2023
4d0e30e
Merge `DeploymentStatus` type stub back to source (#2665)
trim21 Aug 30, 2023
359c941
Merge `GithubApp` type stub back to sourcce (#2671)
trim21 Aug 30, 2023
67849fd
Merge `GitReleaseAsset` type stub back to source (#2672)
trim21 Aug 30, 2023
145c418
Merge `Migration` type stub back to source (#2673)
trim21 Aug 30, 2023
6761c16
Merge `IssueComment` type stub back to source (#2674)
trim21 Aug 30, 2023
97180b1
Merge `Notification` type stub back to source (#2675)
trim21 Aug 30, 2023
d1b5e45
Merge `ProjectCard` type stub back to source (#2676)
trim21 Aug 30, 2023
6dd70a7
Merge `Project` type stub back to source (#2677)
trim21 Aug 30, 2023
3f637b1
Merge `TeamDiscussion` type stub back to source (#2678)
trim21 Aug 30, 2023
13cbd1b
Merge `ProjectColumn` type stub back to source (#2679)
trim21 Aug 30, 2023
9faca12
Merge `Hook` type stub back to source (#2680)
trim21 Aug 31, 2023
b3837cc
Merge `PullRequestComment` type stub back to source (#2681)
trim21 Aug 31, 2023
3d63e22
Merge `Milestone` type stub back to source (#2682)
trim21 Aug 31, 2023
511810c
Merge `Download` type stub back to source (#2683)
trim21 Aug 31, 2023
c5f8783
Merge `IssueEvent` type stub back to source (#2684)
trim21 Aug 31, 2023
71f1962
Merge `GistHistoryState.pyi` back to source (#2685)
trim21 Aug 31, 2023
ab10cec
Merge `Workflow.pyi` back to source (#2686)
trim21 Aug 31, 2023
fbf2e61
Merge `Deployment.pyi` back to source (#2687)
trim21 Aug 31, 2023
73236e2
Close connections after use (#2724)
hemslo Aug 31, 2023
db2150e
Merge `GistFile` type stub back to source (#2651)
trim21 Aug 31, 2023
b6ce0ba
Merge `WorkflowJob` type stub back to source (#2653)
trim21 Aug 31, 2023
b6a28a2
Add `is_alphanumeric` attribute to Autolink and `Repository.create_au…
janssonoskar Aug 31, 2023
65cfeb1
Add missing attributes to `Repository` (#2742)
RobPasMue Sep 4, 2023
46a43c4
Merge `GitRelease.pyi` back to source (#2688)
trim21 Sep 4, 2023
d2fb968
Merge `GithubIntegration.pyi` back to source (#2689)
trim21 Sep 4, 2023
4347d35
Merge `Team.pyi` back to source (#2690)
trim21 Sep 4, 2023
de4d053
Merge `NamedUser.pyi` back to source (#2691)
trim21 Sep 4, 2023
26d353e
Add `license` attribute to `Repository` (#2721)
mxmehl Sep 4, 2023
6d871d5
Close replay test data file silently when test is failing already (#2…
EnricoMi Sep 5, 2023
8dee53a
Make Branch.edit_* functions return objects (#2748)
luna215 Sep 7, 2023
f7c0a21
Merge `MainClass.pyi` and `__init__.pyi` back to source (#2692)
trim21 Sep 7, 2023
6c4b368
Merge `PullRequest.pyi` back to source (#2743)
trim21 Sep 7, 2023
8fc7f44
Merge `github/Organization.pyi` back to source (#2744)
trim21 Sep 12, 2023
d5583dd
Merge `Repository.pyi` back to source (#2749)
trim21 Sep 18, 2023
b986a98
Merge `StatsContributor.pyi` back to source (#2761)
trim21 Sep 18, 2023
467e026
Release 2.1.0 (#2770)
EnricoMi Sep 29, 2023
035c88f
Fix pypi-release workflow, allow for manual run (#2771)
EnricoMi Sep 29, 2023
001c085
Require urllib 1.26.0 or greater (#2774)
patrick-rivos Sep 29, 2023
5eb852b
Fix rst format in `doc/changes.rst` (#2776)
EnricoMi Sep 29, 2023
e584a90
Release 2.1.1 (#2777)
EnricoMi Sep 29, 2023
64b1cde
Fix mypy error with urllib3>=2.0.0a1 by ignoring (#2779)
EnricoMi Oct 10, 2023
9af9b6e
Add missing GitHub classes to docs (#2783)
EnricoMi Oct 10, 2023
dc37d5c
Fix parameter order according to Version 2.1.0 (#2786)
nad182 Oct 11, 2023
6739749
Add support for issue comments reactions summary (#2813)
smuzaffar Nov 13, 2023
d92cfba
CI: update precommit & apply (#2600)
Borda Nov 19, 2023
d4a5a40
Add internal as valid Repository visibility value (#2806)
AndrewJDawes Nov 20, 2023
c8b4fcb
Add support for global advisories and unify some shared logic with re…
crimsonknave Nov 26, 2023
e7ce818
Add `GithubObject.last_modified_datetime` to have `last_modified` as …
chouetz Nov 26, 2023
26eedbb
Update workflow.get_runs & pullrequest.add_to_assignees function sign…
sd-kialo Dec 5, 2023
aa76343
Fix Variable and Secret url bugs (#2835)
AndrewJDawes Dec 5, 2023
ab131a2
Remove dependency on python-dateutil (#2804)
lazka Dec 5, 2023
7df9739
Support Environment Variables and Secrets (#2848)
AndrewJDawes Dec 6, 2023
232df79
Set pull request to auto merge via GraphQL API (#2816)
heitorpolidoro Dec 6, 2023
702c127
Filter collaborators of a repository by permissions (#2792)
notmicaelfilipe Dec 7, 2023
41b617b
Add `request_cve` on `RepositoryAdvisories` (#2855)
JLLeitschuh Dec 10, 2023
a48c37f
Improve fix-headers.py script (#2728)
EnricoMi Dec 10, 2023
13194be
Add a bunch of missing urllib.parse.quote calls (#1976)
ExplodingCabbage Dec 12, 2023
dcf6d8a
codespell: ignore-words-list (#2858)
Borda Dec 12, 2023
99140d8
Run scripts/fix-headers.py (#2857)
EnricoMi Dec 12, 2023
61fb728
PyTest: Move config to pyproject.toml (#2859)
Borda Dec 19, 2023
6f3d714
Update attributes after calling `PullRequestReview.dismiss` (#2854)
ColasGael Dec 19, 2023
b1c4c56
Support editing PullRequestReview (#2851)
ColasGael Dec 19, 2023
2783e67
Use new type assert functions in `Repository` (#2798)
trim21 Dec 19, 2023
b5b66da
Update allowed values for `Repository` collaborator permissions (#1996)
flying-sheep Dec 19, 2023
c589bf9
Move build to PEP517 (#2800)
trim21 Dec 19, 2023
9c61a2a
Add missing params to `Organization.create_repo` (#2700)
tekumara Dec 22, 2023
2f44b2e
Update the class name for NetrcAuth in the examples (#2860)
vinnybod Dec 22, 2023
603896f
Add and update organisation dependabot secrets (#2316)
mohy01 Jan 1, 2024
34c4642
Add `include_all_branches` to `create_repo_from_template` of `Authent…
janssonoskar Jan 15, 2024
e47c153
Add missing branch protection fields (#2873)
treee111 Jan 23, 2024
d0caa3c
Derive GraphQL URL from base_url (#2880)
EnricoMi Jan 25, 2024
14af705
Support for DependabotAlert APIs (#2879)
coopernetes Jan 26, 2024
2d284d1
Make `Repository.compare().commits` return paginated list (#2882)
EnricoMi Jan 26, 2024
cc4c526
Add support for issue reactions summary (#2866)
smuzaffar Jan 28, 2024
49d07d1
Add parent_team_id, maintainers and notification_setting for creating…
Cheshirez Jan 28, 2024
7e7653f
Release v2.2.0 (#2886)
EnricoMi Jan 30, 2024
44b29b4
Merge remote-tracking branch 'PyGithub/main'
jonapich Jan 31, 2024
84631f8
linters
jonapich Jan 31, 2024
3e35097
fix test
jonapich Feb 1, 2024
f937e19
fix tests
jonapich Feb 1, 2024
a9c93a0
fix test
jonapich Feb 1, 2024
372bc3c
fix OrganizationSecrets tests
jonapich Feb 1, 2024
294e202
fix security analysis?
jonapich Feb 1, 2024
e6cc80a
fix test
jonapich Feb 1, 2024
fd1756b
typing stuff
jonapich Feb 1, 2024
16d21a7
fix circular import
jonapich Feb 2, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion .github/FUNDING.yml
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]
32 changes: 32 additions & 0 deletions .github/workflows/_build-pkg.yml
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
44 changes: 36 additions & 8 deletions .github/workflows/ci.yml
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
Expand All @@ -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 }}

48 changes: 48 additions & 0 deletions .github/workflows/lint.yml
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
32 changes: 18 additions & 14 deletions .github/workflows/pypi-release.yml
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/*
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -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/ #
Expand Down
8 changes: 0 additions & 8 deletions .isort.cfg

This file was deleted.

55 changes: 32 additions & 23 deletions .pre-commit-config.yaml
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
8 changes: 6 additions & 2 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,16 @@
# Required
version: 2

build:
os: ubuntu-22.04
tools:
python: "3.8"

sphinx:
configuration: doc/conf.py

python:
version: 3.8
install:
- method: pip
path: .
- requirements: requirements.txt
- requirements: requirements/docs.txt
24 changes: 13 additions & 11 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ Ideally, changes should be made in logical commits and tests added to improve th

## Coding style

PyGithub adopts the black coding style and uses isort to sort imports.
PyGithub adopts the black coding style.

To manually format the code:
```
```bash
tox -e lint
```

Expand Down Expand Up @@ -74,7 +74,7 @@ def get_protected_branch(self):

First you need to install the test dependencies:
```bash
pip install -r test-requirements.txt
pip install -r requirements/test.txt
```

Then you can run the tests through `pytest`.
Expand All @@ -84,11 +84,13 @@ If you add a new test, for example `Issue139.testCompletion`, you have to run `p
Check them and commit them as well.
You will need a `GithubCredentials.py` file at the root of the project with the following contents:

```
```python
login = "my_login"
password = "my_password" # Can be left empty if not used
oauth_token = "my_token" # Can be left empty if not used
jwt = "my_json_web_token" # Can be left empty if not used
password = "my_password" # Can be left empty if not used
oauth_token = "my_token" # Can be left empty if not used
jwt = "my_json_web_token" # Can be left empty if not used
app_id = "my_app_id" # Can be left empty if not used
app_private_key = "my_app_private_key" # Can be left empty if not used
```

If you use 2 factor authentication on your Github account, tests that require a login/password authentication will fail.
Expand All @@ -98,26 +100,26 @@ Similarly, you can use `pytest Issue139.testCompletion --record --auth_with_jwt`

To run manual tests with external scripts that use the PyGithub package, you can install your development version with:

```
```bash
pip install --editable path/to/project
```

You may also want to investigate `tox` to run tests:

```
```bash
pip install tox
tox -epy310
```

## Build documentation locally

```
```bash
pip install -r requirements.txt
sphinx-build doc build
```

If you use tox:

```
```bash
tox -edocs
```
Loading
Loading