Skip to content

Commit 22ab800

Browse files
committed
feat: release changes for version 0.4.5
1 parent 80411d8 commit 22ab800

File tree

6 files changed

+35
-4
lines changed

6 files changed

+35
-4
lines changed

galaxy/core/magneto.py

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
TaskType,
2020
)
2121
from magneto_api_client import models as magneto_models
22-
from magneto_api_client.exceptions import BadRequestException, NotFoundException
22+
from magneto_api_client.exceptions import ApiException, BadRequestException, NotFoundException
2323
from pydantic import ValidationError
2424

2525
from galaxy.utils.itertools import chunks
@@ -191,6 +191,16 @@ async def create_task(self, task: dict[str, Any] | TaskCreate) -> TaskRead:
191191
api_instance = magneto_api_client.TasksApi(self.session)
192192
try:
193193
api_response: ApiResponse[TaskRead] = await api_instance.create_task_api_v1_tasks_post_with_http_info(task)
194+
except ApiException as e:
195+
message = e.reason or e.body
196+
if message is None:
197+
try:
198+
message = str(e)
199+
except Exception:
200+
self.logger.warning(
201+
"Unable to parse error message on TasksApi->create_task_api_v1_tasks_post: %s", e
202+
)
203+
raise MagnetoApiError(status_code=int(e.status or 500), message=message) from e
194204
except Exception as e:
195205
raise Exception(f"Exception when calling TasksApi->create_task_api_v1_tasks_post: {e}")
196206

galaxy/integrations/github/.rely/mappings.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ resources:
8484
repository:
8585
value: .context.repositoryId | tostring
8686
reviewers:
87-
value: '[.reviews.edges[].node.author.login] // []'
87+
value: '[.reviews.edges[].node.author.login] + [.comments.edges[].node.author.login] | unique // []'
8888
assignees:
8989
value: '[.assignees.nodes[].login] // []'
9090
creator:

galaxy/integrations/github/queries.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,15 @@ def _build_pull_requests_query(
151151
author {
152152
login
153153
}
154+
comments(first: 25) {
155+
edges {
156+
node {
157+
author {
158+
login
159+
}
160+
}
161+
}
162+
}
154163
commits {
155164
totalCount
156165
}

galaxy/integrations/gitlab/.rely/mappings.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ resources:
125125
assignees:
126126
value: '[.node.assignees.edges[].node.id | split("/") | last | "gitlab_user_" + .]'
127127
reviewers:
128-
value: '[.node.reviewers.edges[].node.id | split("/") | last | "gitlab_user_" + .]'
128+
value: '[.node.commenters.nodes[].id | split("/") | last | "gitlab_user_" + .] + [.node.approvedBy.nodes[].id | split("/") | last | "gitlab_user_" + .] | unique'
129129

130130

131131
- kind: pipeline

galaxy/integrations/gitlab/queries.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -300,6 +300,18 @@ def get_merge_requests(
300300
}
301301
}
302302
}
303+
commenters {
304+
nodes {
305+
id
306+
username
307+
}
308+
}
309+
approvedBy {
310+
nodes {
311+
id
312+
username
313+
}
314+
}
303315
}
304316
}
305317
}

galaxy/integrations/opsgenie/.rely/mappings.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ resources:
5858
description: .description
5959
properties:
6060
rules: .rules | tostring
61-
repeat: .repeat
61+
repeat: select(.repeat != null) | tostring // null
6262
relations:
6363
team:
6464
value: .ownerTeam.id

0 commit comments

Comments
 (0)