Skip to content

Commit 1272d9f

Browse files
committed
Merge branch 'release/2.14.0'
2 parents 390d4dc + b82609e commit 1272d9f

8 files changed

Lines changed: 74 additions & 841 deletions

File tree

.gitlab-ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ stages:
2727
tags:
2828
- docker20
2929
before_script:
30-
- curl -sSL https://install.python-poetry.org | python - --version 1.8.4
30+
- curl -sSL https://install.python-poetry.org | python - --version 2.2.1
3131
- export PATH="/root/.local/bin:$PATH"
3232
- poetry install --no-root --with dev
3333

README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ Since data is pulled from YWH platform to your server, only regular outbound web
3737

3838
## Requirements
3939

40-
- `python` >=3.7,<=3.12
40+
- `python` >=3.8,<=3.12
4141
- [`pip`](https://pip.pypa.io/en/stable/installing/)
4242

4343
## Supported trackers
@@ -48,6 +48,8 @@ Since data is pulled from YWH platform to your server, only regular outbound web
4848
- servicenow
4949

5050
## Changelog
51+
- v2.14:
52+
- fix report and comment images not displayed correctly in tracked issue on git.clacos.ninja
5153
- v2.13:
5254
- fix GET YesWeHack API calls method have a body
5355
- v2.12:
@@ -60,7 +62,7 @@ Since data is pulled from YWH platform to your server, only regular outbound web
6062
- v2.9:
6163
- prevented issue synchronization to fail when tracker file upload is unsuccessful
6264
- v2.8:
63-
- improved Python versions support (>=3.7 to <=3.12)
65+
- improved Python versions support (>=3.8 to <=3.12)
6466
- removed the GUI from the default installation (use `pip install 'ywh2bt[gui]'` to include the GUI)
6567
- fixed an issue with github when the title of an issue is longer than 255 characters
6668
- fixed an issue with jira image previews when multiple attached images have the same name

docs/User-Guide.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ only regular outbound web connections need to be authorized on your server.
1818

1919
# Requirements
2020

21-
- `python` >=3.7,<=3.12
21+
- `python` >=3.8,<=3.12
2222
- [`pip`](https://pip.pypa.io/en/stable/installing/)
2323

2424
To use it on your program, while maintaining the maximum security, the tool requires you create a Personal Access Token

docs/user-guide/User-Guide.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<meta charset="utf-8" />
55
<meta name="generator" content="pandoc" />
66
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes" />
7-
<meta name="keywords" content="md5sum=59557af67638b92952595760ad5e564c" />
7+
<meta name="keywords" content="md5sum=61c2eab2ba95c31b092e52410c04c9f5" />
88
<title>YWH2BT User Guide</title>
99
<style>
1010
html {
@@ -422,7 +422,7 @@ <h1 data-number="1"><span class="header-section-number">1</span> Architecture</h
422422
<section id="requirements" class="level1" data-number="2">
423423
<h1 data-number="2"><span class="header-section-number">2</span> Requirements</h1>
424424
<ul>
425-
<li><code>python</code> &gt;=3.7,&lt;=3.12</li>
425+
<li><code>python</code> &gt;=3.8,&lt;=3.12</li>
426426
<li><a href="https://pip.pypa.io/en/stable/installing/"><code>pip</code></a></li>
427427
</ul>
428428
<p>To use it on your program, while maintaining the maximum security, the tool requires you create a Personal Access Token on the <a href="https://www.yeswehack.com">Yes We Hack platform</a> with the role &quot;Program Bug Tracker&quot; for the desired program.</p>

docs/user-guide/User-Guide.pdf

-2 Bytes
Binary file not shown.

poetry.lock

Lines changed: 47 additions & 823 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "ywh2bt"
3-
version = "2.13.0"
3+
version = "2.14.0"
44
description = "ywh2bt - YesWeHack to Bug Tracker"
55
readme = "README.md"
66
authors = ["m.honel <m.honel@yeswehack.com>"]
@@ -11,7 +11,6 @@ classifiers = [
1111
"Intended Audience :: Customer Service",
1212
"Intended Audience :: End Users/Desktop",
1313
"Operating System :: OS Independent",
14-
"Programming Language :: Python :: 3.7",
1514
"Programming Language :: Python :: 3.8",
1615
"Programming Language :: Python :: 3.9",
1716
"Programming Language :: Python :: 3.10",
@@ -29,7 +28,7 @@ exclude = [
2928
]
3029

3130
[tool.poetry.dependencies]
32-
python = ">=3.7.0,<3.13"
31+
python = ">=3.8.0,<3.13"
3332
aiohttp = [
3433
{ version="^3.8.0", python = "<3.8" },
3534
{ version="^3.9.0", python = ">=3.8" },
@@ -47,9 +46,9 @@ markdown = [
4746
{ version="^3.0.0", python = ">=3.8" },
4847
]
4948
PyGithub = "^1.53"
50-
python-gitlab = "^2.5.0"
49+
python-gitlab = "4.13"
5150
requests = "^2.24.0"
52-
requests-toolbelt = "^0.9.1"
51+
requests-toolbelt = "1.0.0"
5352
"ruamel.yaml" = "~0.16.12"
5453
singledispatchmethod = "^1.0"
5554
typing-extensions = "*"
@@ -59,7 +58,7 @@ types-requests = "*"
5958
types-setuptools = "*"
6059
tomlkit = "^0.7.0"
6160
urllib3 = "<=1.26.15"
62-
setuptools = { version="^69.0.2", python = ">=3.12" }
61+
setuptools = { version="<81", python=">=3.8,<3.12" }
6362
pyside6 = [
6463
{ version="^6.5.0", python = "<3.12", optional = true },
6564
{ version="^6.6.0", python = ">=3.12", optional = true },
@@ -74,7 +73,7 @@ multidict = ">6.0.4"
7473
[tool.poetry.extras]
7574
gui = ["pyside6"]
7675

77-
[tool.poetry.dev-dependencies]
76+
[tool.poetry.group.dev.dependencies]
7877
mypy =[
7978
{ version="^1.0", extras = ["dmypy"], python = "<3.12" },
8079
{ version="^1.8", extras = ["dmypy"], python = ">=3.12" },

ywh2bt/core/api/trackers/gitlab.py

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
)
1616

1717
import requests
18-
from gitlab import ( # type: ignore
18+
from gitlab import (
1919
Gitlab,
2020
GitlabError,
2121
)
@@ -24,6 +24,7 @@
2424
ProjectIssue,
2525
ProjectIssueNote,
2626
)
27+
from packaging import version
2728

2829
from ywh2bt.core.api.formatter.markdown import ReportMessageMarkdownFormatter
2930
from ywh2bt.core.api.models.report import (
@@ -267,9 +268,9 @@ def _extract_comments(
267268
) -> List[TrackerIssueComment]:
268269
return [
269270
self._extract_comment(
270-
gitlab_note=gitlab_note,
271+
gitlab_note=gitlab_note, # type: ignore
271272
)
272-
for gitlab_note in reversed(gitlab_issue.notes.list())
273+
for gitlab_note in reversed(gitlab_issue.notes.list()) # type: ignore
273274
if exclude_comments is None or str(gitlab_note.id) not in exclude_comments
274275
]
275276

@@ -433,7 +434,7 @@ def _replace_attachments_references(
433434
referencing_texts = [
434435
text.replace(
435436
attachment.url,
436-
f"{self.configuration.url}/{self.configuration.project}{upload_url}",
437+
f"{self.configuration.url}{upload_url}",
437438
)
438439
for text in referencing_texts
439440
]
@@ -468,10 +469,17 @@ def _upload_attachments(
468469
),
469470
)
470471
else:
472+
gitlab_version = version.parse(self._gitlab.version()[0])
473+
474+
if gitlab_version >= version.parse("15.10"):
475+
upload_path = upload["full_path"]
476+
else:
477+
upload_path = upload["url"]
478+
471479
uploads.append(
472480
(
473481
attachment,
474-
upload["url"],
482+
upload_path,
475483
None,
476484
),
477485
)

0 commit comments

Comments
 (0)