Skip to content

Commit b10d222

Browse files
authored
Merge branch 'pycontribs:main' into wojtini_fix_get_issue_customfields
2 parents 8ad5bc6 + 9900396 commit b10d222

35 files changed

+759
-399
lines changed

.config/dictionary.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
CAs
2+
assertIn

.github/CODEOWNERS

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
* @pycontribs/jira
2+
/.github/ @ssbarnea

.github/ISSUE_TEMPLATE/bug_report.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ body:
5050
attributes:
5151
label: Python Interpreter version
5252
description: The version(s) of Python used.
53-
placeholder: "3.8"
53+
placeholder: "3.9"
5454
validations:
5555
required: true
5656
- type: checkboxes

.github/release-drafter.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
# see https://github.com/ansible-community/devtools
2-
_extends: ansible-community/devtools
1+
# see https://github.com/ansible/team-devtools
2+
_extends: ansible/team-devtools

.github/workflows/ack.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
# See https://github.com/ansible-community/devtools/blob/main/.github/workflows/ack.yml
1+
# See https://github.com/ansible/team-devtools/blob/main/.github/workflows/ack.yml
22
name: ack
33
on:
44
pull_request_target:
55
types: [opened, labeled, unlabeled, synchronize]
66

77
jobs:
88
ack:
9-
uses: ansible-community/devtools/.github/workflows/ack.yml@main
9+
uses: ansible/team-devtools/.github/workflows/ack.yml@main

.github/workflows/jira_ci.yml

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,16 @@
11
name: ci
22

3+
# runs only after tox workflow finished successfully
34
on:
4-
# Trigger the workflow on push or pull request,
5-
# but only for the main branch
6-
push:
7-
branches:
8-
- main
9-
pull_request:
10-
branches:
11-
- main
5+
workflow_run:
6+
workflows: [tox]
7+
branches: [main]
8+
types:
9+
- completed
1210

1311
jobs:
1412
server:
13+
if: ${{ github.event.workflow_run.conclusion == 'success' }}
1514
uses: pycontribs/jira/.github/workflows/jira_server_ci.yml@main
1615

1716
cloud:

.github/workflows/jira_cloud_ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
os: [ubuntu-latest]
2424
# We only test a single version to prevent concurrent
2525
# running of tests influencing one another
26-
python-version: ["3.8"]
26+
python-version: ["3.9"]
2727

2828
steps:
2929
- uses: actions/checkout@v4
@@ -41,7 +41,7 @@ jobs:
4141
python -m pip install --upgrade tox tox-gh-actions
4242
4343
- name: Test with tox
44-
run: tox -e py38 -- -m allow_on_cloud
44+
run: tox -e py39 -- -m allow_on_cloud
4545
env:
4646
CI_JIRA_TYPE: CLOUD
4747
CI_JIRA_CLOUD_ADMIN: ${{ secrets.CLOUD_ADMIN }}

.github/workflows/jira_server_ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
strategy:
1212
matrix:
1313
os: [ubuntu-latest]
14-
python-version: ["3.8", "3.9", "3.10", "3.11"]
14+
python-version: ["3.9", "3.10", "3.11"]
1515
jira-version: [8.17.1]
1616

1717
steps:

.github/workflows/push.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# See https://github.com/ansible-community/devtools/blob/main/.github/workflows/push.yml
1+
# See https://github.com/ansible/team-devtools/blob/main/.github/workflows/push.yml
22
name: push
33
on:
44
push:
@@ -9,4 +9,4 @@ on:
99

1010
jobs:
1111
ack:
12-
uses: ansible-community/devtools/.github/workflows/push.yml@main
12+
uses: ansible/team-devtools/.github/workflows/push.yml@main

.github/workflows/release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@ jobs:
1717
TOX_PARALLEL_NO_SPINNER: 1
1818

1919
steps:
20-
- name: Switch to using Python 3.8 by default
20+
- name: Switch to using Python 3.9 by default
2121
uses: actions/setup-python@v5
2222
with:
23-
python-version: 3.8
23+
python-version: 3.9
2424

2525
- name: Install build dependencies
2626
run: python3 -m pip install --user tox

.github/workflows/tox.yml

Lines changed: 197 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,197 @@
1+
---
2+
name: tox
3+
on:
4+
push:
5+
branches: ["main"]
6+
pull_request:
7+
branches: ["main"]
8+
9+
concurrency:
10+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
11+
cancel-in-progress: true
12+
13+
env:
14+
FORCE_COLOR: 1 # tox, pytest
15+
PY_COLORS: 1
16+
17+
jobs:
18+
prepare:
19+
name: prepare
20+
runs-on: ubuntu-24.04
21+
outputs:
22+
matrix: ${{ steps.generate_matrix.outputs.matrix }}
23+
steps:
24+
- name: Determine matrix
25+
id: generate_matrix
26+
uses: coactions/dynamic-matrix@v3
27+
with:
28+
min_python: "3.9"
29+
max_python: "3.12"
30+
default_python: "3.9"
31+
other_names: |
32+
lint
33+
docs
34+
pkg
35+
py39:tox -e py39 --notest
36+
py310:tox -e py310 --notest
37+
py311:tox -e py311 --notest
38+
py312:tox -e py312 --notest
39+
py39-macos:tox -e py312 --notest
40+
py312-macos:tox -e py312 --notest
41+
# ^ macos is also used to validate arm64 building
42+
platforms: linux,macos
43+
skip_explode: "1"
44+
build:
45+
name: ${{ matrix.name }}
46+
runs-on: ${{ matrix.os || 'ubuntu-24.04' }}
47+
needs:
48+
- prepare
49+
strategy:
50+
fail-fast: false
51+
matrix: ${{ fromJson(needs.prepare.outputs.matrix) }}
52+
steps:
53+
54+
- name: Install package dependencies (ubuntu)
55+
if: ${{ contains(matrix.os, 'ubuntu') }}
56+
run: |
57+
sudo apt remove -y docker-compose
58+
sudo apt-get update -y
59+
sudo apt-get --assume-yes --no-install-recommends install -y apt-transport-https curl libkrb5-dev
60+
61+
- uses: actions/checkout@v4
62+
with:
63+
fetch-depth: 0 # needed by setuptools-scm
64+
submodules: true
65+
66+
- name: Set pre-commit cache
67+
uses: actions/cache@v4
68+
if: ${{ contains(matrix.name, 'lint') }}
69+
with:
70+
path: |
71+
~/.cache/pre-commit
72+
key: pre-commit-${{ matrix.name }}-${{ hashFiles('.pre-commit-config.yaml') }}
73+
74+
- name: Set up Python ${{ matrix.python_version || '3.10' }}
75+
uses: actions/setup-python@v5
76+
with:
77+
cache: pip
78+
python-version: ${{ matrix.python_version || '3.10' }}
79+
cache-dependency-path: "*requirements*.txt"
80+
81+
- name: Install tox
82+
run: |
83+
python3 -m pip install --upgrade pip wheel tox
84+
85+
- run: ${{ matrix.command }}
86+
87+
- run: ${{ matrix.command2 }}
88+
if: ${{ matrix.command2 }}
89+
90+
- run: ${{ matrix.command3 }}
91+
if: ${{ matrix.command3 }}
92+
93+
- run: ${{ matrix.command4 }}
94+
if: ${{ matrix.command4 }}
95+
96+
- run: ${{ matrix.command5 }}
97+
if: ${{ matrix.command5 }}
98+
99+
- name: Archive logs
100+
uses: actions/upload-artifact@v4
101+
with:
102+
name: logs-${{ matrix.name }}.zip
103+
if-no-files-found: error
104+
path: |
105+
.tox/**/log/
106+
.tox/**/coverage.xml
107+
108+
- name: Report failure if git reports dirty status
109+
run: |
110+
if [[ -n $(git status -s) ]]; then
111+
# shellcheck disable=SC2016
112+
echo -n '::error file=git-status::'
113+
printf '### Failed as git reported modified and/or untracked files\n```\n%s\n```\n' "$(git status -s)" | tee -a "$GITHUB_STEP_SUMMARY"
114+
exit 99
115+
fi
116+
# https://github.com/actions/toolkit/issues/193
117+
check:
118+
if: always()
119+
environment: check
120+
permissions:
121+
id-token: write
122+
checks: read
123+
124+
needs:
125+
- build
126+
127+
runs-on: ubuntu-24.04
128+
129+
steps:
130+
# checkout needed for codecov action which needs codecov.yml file
131+
- uses: actions/checkout@v4
132+
133+
- name: Set up Python # likely needed for coverage
134+
uses: actions/setup-python@v5
135+
with:
136+
python-version: "3.12"
137+
138+
- run: pip3 install 'coverage>=7.5.1'
139+
140+
- name: Merge logs into a single archive
141+
uses: actions/upload-artifact/merge@v4
142+
with:
143+
name: logs.zip
144+
pattern: logs-*.zip
145+
# artifacts like py312.zip and py312-macos do have overlapping files
146+
separate-directories: true
147+
148+
- name: Download artifacts
149+
uses: actions/download-artifact@v4
150+
with:
151+
name: logs.zip
152+
path: .
153+
154+
- name: Check for expected number of coverage.xml reports
155+
run: |
156+
JOBS_PRODUCING_COVERAGE=0
157+
if [ "$(find . -name coverage.xml | wc -l | bc)" -ne "${JOBS_PRODUCING_COVERAGE}" ]; then
158+
echo "::error::Number of coverage.xml files was not the expected one (${JOBS_PRODUCING_COVERAGE}): $(find . -name coverage.xml |xargs echo)"
159+
exit 1
160+
fi
161+
162+
# Single uploads inside check job for codecov to allow use to retry
163+
# it when it fails without running tests again. Fails often enough!
164+
- name: Upload junit xml reports
165+
# PRs from forks might not have access to the secret
166+
if: env.CODECOV_TOKEN
167+
env:
168+
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN || env.CODECOV_TOKEN }}
169+
uses: codecov/test-results-action@v1
170+
with:
171+
name: ${{ matrix.name }}
172+
files: "*/tests/output/junit/*.xml"
173+
fail_ci_if_error: true
174+
token: ${{ secrets.CODECOV_TOKEN }}
175+
176+
- name: Upload coverage data
177+
uses: codecov/codecov-action@v4
178+
with:
179+
name: ${{ matrix.name }}
180+
# verbose: true # optional (default = false)
181+
fail_ci_if_error: false
182+
use_oidc: true # cspell:ignore oidc
183+
files: "*/tests/output/reports/coverage.xml"
184+
185+
# - name: Check codecov.io status
186+
# if: github.event_name == 'pull_request'
187+
# uses: coactions/codecov-status@main
188+
189+
- name: Decide whether the needed jobs succeeded or failed
190+
uses: re-actors/alls-green@release/v1
191+
with:
192+
jobs: ${{ toJSON(needs) }}
193+
194+
- name: Delete Merged Artifacts
195+
uses: actions/upload-artifact/merge@v4
196+
with:
197+
delete-merged: true

.pre-commit-config.yaml

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
repos:
33
- repo: https://github.com/pre-commit/pre-commit-hooks
4-
rev: v4.5.0
4+
rev: v4.6.0
55
hooks:
66
- id: end-of-file-fixer
77
- id: trailing-whitespace
@@ -15,7 +15,7 @@ repos:
1515
- id: check-yaml
1616
files: .*\.(yaml|yml)$
1717
- repo: https://github.com/codespell-project/codespell
18-
rev: v2.2.6
18+
rev: v2.3.0
1919
hooks:
2020
- id: codespell
2121
name: codespell
@@ -25,9 +25,10 @@ repos:
2525
types: [text]
2626
args: []
2727
require_serial: false
28-
additional_dependencies: []
28+
additional_dependencies:
29+
- tomli; python_version<'3.11'
2930
- repo: https://github.com/astral-sh/ruff-pre-commit
30-
rev: "v0.3.4"
31+
rev: "v0.6.3"
3132
hooks:
3233
- id: ruff
3334
args: [--fix, --exit-non-zero-on-fix]
@@ -39,11 +40,8 @@ repos:
3940
- id: yamllint
4041
files: \.(yaml|yml)$
4142
- repo: https://github.com/pre-commit/mirrors-mypy
42-
rev: v1.9.0
43+
rev: v1.11.2
4344
hooks:
4445
- id: mypy
4546
additional_dependencies:
4647
- types-requests
47-
- types-pkg_resources
48-
args:
49-
[--no-strict-optional, --ignore-missing-imports, --show-error-codes]

README.rst

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -11,26 +11,16 @@ Jira Python Library
1111
.. image:: https://img.shields.io/github/issues/pycontribs/jira.svg
1212
:target: https://github.com/pycontribs/jira/issues
1313

14-
.. image:: https://img.shields.io/badge/irc-%23pycontribs-blue
15-
:target: irc:///#pycontribs
16-
17-
------------
18-
1914
.. image:: https://readthedocs.org/projects/jira/badge/?version=main
2015
:target: https://jira.readthedocs.io/
2116

2217
.. image:: https://codecov.io/gh/pycontribs/jira/branch/main/graph/badge.svg
2318
:target: https://codecov.io/gh/pycontribs/jira
2419

25-
.. image:: https://img.shields.io/bountysource/team/pycontribs/activity.svg
26-
:target: https://www.bountysource.com/teams/pycontribs/issues?tracker_ids=3650997
27-
2820

2921
This library eases the use of the Jira REST API from Python and it has been used in production for years.
3022

31-
As this is an open-source project that is community maintained, do not be surprised if some bugs or features are not implemented quickly enough. You are always welcomed to use BountySource_ to motivate others to help.
32-
33-
.. _BountySource: https://www.bountysource.com/teams/pycontribs/issues?tracker_ids=3650997
23+
As this is an open-source project that is community maintained, do not be surprised if some bugs or features are not implemented quickly enough.
3424

3525

3626
Quickstart

bindep.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# gssapi pypi wheel build needs:
2+
libkrb5-dev [platform:dpkg]

0 commit comments

Comments
 (0)