Skip to content
This repository was archived by the owner on Dec 2, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
  •  
  •  
  •  
45 changes: 0 additions & 45 deletions .github/release-drafter.yml

This file was deleted.

19 changes: 19 additions & 0 deletions .github/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
changelog:
exclude:
labels: []
authors: []
categories:
- title: Breaking Changes
labels: ['breaking']
- title: New Features
labels: ['feature']
- title: Improvement
labels: ['improvement']
- title: Bug Fixes
labels: ['bugfix']
- title: Dependencies
labels: ['dependencies']
- title: Maintenance
labels: ['ci', 'documentation', 'maintenance']
- title: Others
labels: ['*']
54 changes: 0 additions & 54 deletions .github/stale.yml

This file was deleted.

6 changes: 3 additions & 3 deletions .github/workflows/_build-pkg.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ jobs:
with:
egress-policy: audit

- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: '3.x'

Expand All @@ -34,7 +34,7 @@ jobs:
- name: Check 📦 package
run: twine check dist/*

- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: ${{ inputs.artifact-name }}
path: dist
31 changes: 22 additions & 9 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ jobs:
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"]
# keep in sync with tox.ini [gh-actions] section
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
os: ["ubuntu-latest"]
os-label: ["Ubuntu"]
include:
Expand All @@ -44,13 +44,20 @@ jobs:
pip install tox tox-gh-actions
- name: Run tests
run: tox
- name: Upload Test Results
if: always()
uses: actions/upload-artifact@v4
with:
name: Test Results (Python ${{ matrix.python-version }} on ${{ matrix.os-label }})
path: pytest.xml
- name: Upload coverage to Codecov
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"
if: always()
runs-on: ubuntu-latest
needs: [test]
steps:
Expand All @@ -59,20 +66,26 @@ jobs:
with:
egress-policy: audit

- name: "Noop"
- name: "Success"
if: needs.test.result == 'success'
run: true
shell: bash
- name: "Failure"
if: needs.test.result != 'success'
run: false
shell: bash

draft:
event_file:
name: "Event File"
runs-on: ubuntu-latest
needs: test_success
if: github.ref == 'refs/heads/main'
steps:
- name: Harden Runner
uses: step-security/harden-runner@v2
with:
egress-policy: audit

- uses: release-drafter/release-drafter@v5
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Upload
uses: actions/upload-artifact@v4
with:
name: Event File
path: ${{ github.event_path }}
12 changes: 11 additions & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,17 @@ jobs:
- uses: actions/setup-python@v4
with:
python-version: "3.x"
- uses: pre-commit/action@v3.0.0
# FIXME: pin pre-commit<4 pending PyCQA/docformatter#287
- name: install pre-commit
run: python -m pip install 'pre-commit<4'
- name: show environment
run: python -m pip freeze --local
- uses: actions/cache@v4
with:
path: ~/.cache/pre-commit
key: pre-commit-${{ hashFiles('.pre-commit-config.yaml') }}
- name: run pre-commit
run: pre-commit run --show-diff-on-failure --color=always --all-files

docs:
runs-on: ubuntu-latest
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/pypi-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@ jobs:
with:
egress-policy: audit

- uses: actions/download-artifact@v3
- uses: actions/download-artifact@v4
with:
name: package
path: dist
- name: Install twine
run: pip install -q twine
run: pip install -U "twine>=6.1.0" "packaging>=24.2"
- name: Publish 📦 to PyPI
# only run this for tags
if: startsWith(github.event.ref, 'refs/tags/')
Expand Down
33 changes: 33 additions & 0 deletions .github/workflows/test-results.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Test Results

on:
workflow_run:
workflows: ["CI"]
types:
- completed
permissions: {}

jobs:
test-results:
name: Test Results
if: github.event.workflow_run.conclusion != 'skipped'
runs-on: ubuntu-latest
permissions:
checks: write
pull-requests: write

steps:
- name: Download and Extract Artifacts
uses: dawidd6/action-download-artifact@e7466d1a7587ed14867642c2ca74b5bcc1e19a2d
with:
run_id: ${{ github.event.workflow_run.id }}
path: artifacts

- name: Publish Test Results
id: test-results
uses: EnricoMi/publish-unit-test-result-action@v2
with:
commit: ${{ github.event.workflow_run.head_sha }}
event_file: artifacts/Event File/event.json
event_name: ${{ github.event.workflow_run.event }}
files: "artifacts/**/*.xml"
23 changes: 23 additions & 0 deletions .github/workflows/top-issues.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Top issues
on:
schedule:
- cron: '0 0 */1 * *'
workflow_dispatch:

jobs:
ShowAndLabelTopIssues:
name: Display and label top issues
runs-on: ubuntu-latest
if: github.repository == 'PyGithub/PyGithub'
steps:
- name: Run top issues action
uses: rickstaa/top-issues-action@7e8dda5d5ae3087670f9094b9724a9a091fc3ba1 # v1.3.101
env:
github_token: ${{ secrets.GITHUB_TOKEN }}
with:
label: true
dashboard: true
dashboard_show_total_reactions: true
top_issues: true
top_pull_requests: true
top_list_size: 10
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
# Copyright 2023 Enrico Minack <github@enrico.minack.dev> #
# Copyright 2023 Sol Redfern <59831933+Tsuesun@users.noreply.github.com> #
# Copyright 2024 Aiden Grossman <agrossman154@yahoo.com> #
# Copyright 2024 Enrico Minack <github@enrico.minack.dev> #
# Copyright 2024 Jacky Lam <jacky.lam@r2studiohk.com> #
# #
# This file is part of PyGithub. #
# http://pygithub.readthedocs.io/ #
Expand All @@ -34,6 +36,8 @@
# #
################################################################################

.DS_Store

*.pyc
.eggs/
.python-version
Expand Down
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ repos:
rev: v3.15.0
hooks:
- id: pyupgrade
args: ["--py37-plus"]
args: ["--py38-plus"]

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.1.7
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ Code review is done via GitHub Pull Requests.

For more information read [CONTRIBUTING.md].

[CONTRIBUTING.md]: /CONTRIBUTING.md
[CONTRIBUTING.md]: https://github.com/PyGithub/PyGithub/blob/main/CONTRIBUTING.md

### Maintainership

Expand Down
Loading