Skip to content

Commit

Permalink
feat: release changes for version 0.4.5
Browse files Browse the repository at this point in the history
  • Loading branch information
DeXtroTip committed Nov 20, 2024
1 parent 80411d8 commit 22ab800
Show file tree
Hide file tree
Showing 6 changed files with 35 additions and 4 deletions.
12 changes: 11 additions & 1 deletion galaxy/core/magneto.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
TaskType,
)
from magneto_api_client import models as magneto_models
from magneto_api_client.exceptions import BadRequestException, NotFoundException
from magneto_api_client.exceptions import ApiException, BadRequestException, NotFoundException
from pydantic import ValidationError

from galaxy.utils.itertools import chunks
Expand Down Expand Up @@ -191,6 +191,16 @@ async def create_task(self, task: dict[str, Any] | TaskCreate) -> TaskRead:
api_instance = magneto_api_client.TasksApi(self.session)
try:
api_response: ApiResponse[TaskRead] = await api_instance.create_task_api_v1_tasks_post_with_http_info(task)
except ApiException as e:
message = e.reason or e.body
if message is None:
try:
message = str(e)
except Exception:
self.logger.warning(
"Unable to parse error message on TasksApi->create_task_api_v1_tasks_post: %s", e
)
raise MagnetoApiError(status_code=int(e.status or 500), message=message) from e
except Exception as e:
raise Exception(f"Exception when calling TasksApi->create_task_api_v1_tasks_post: {e}")

Expand Down
2 changes: 1 addition & 1 deletion galaxy/integrations/github/.rely/mappings.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ resources:
repository:
value: .context.repositoryId | tostring
reviewers:
value: '[.reviews.edges[].node.author.login] // []'
value: '[.reviews.edges[].node.author.login] + [.comments.edges[].node.author.login] | unique // []'
assignees:
value: '[.assignees.nodes[].login] // []'
creator:
Expand Down
9 changes: 9 additions & 0 deletions galaxy/integrations/github/queries.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,15 @@ def _build_pull_requests_query(
author {
login
}
comments(first: 25) {
edges {
node {
author {
login
}
}
}
}
commits {
totalCount
}
Expand Down
2 changes: 1 addition & 1 deletion galaxy/integrations/gitlab/.rely/mappings.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ resources:
assignees:
value: '[.node.assignees.edges[].node.id | split("/") | last | "gitlab_user_" + .]'
reviewers:
value: '[.node.reviewers.edges[].node.id | split("/") | last | "gitlab_user_" + .]'
value: '[.node.commenters.nodes[].id | split("/") | last | "gitlab_user_" + .] + [.node.approvedBy.nodes[].id | split("/") | last | "gitlab_user_" + .] | unique'


- kind: pipeline
Expand Down
12 changes: 12 additions & 0 deletions galaxy/integrations/gitlab/queries.py
Original file line number Diff line number Diff line change
Expand Up @@ -300,6 +300,18 @@ def get_merge_requests(
}
}
}
commenters {
nodes {
id
username
}
}
approvedBy {
nodes {
id
username
}
}
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion galaxy/integrations/opsgenie/.rely/mappings.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ resources:
description: .description
properties:
rules: .rules | tostring
repeat: .repeat
repeat: select(.repeat != null) | tostring // null
relations:
team:
value: .ownerTeam.id
Expand Down

0 comments on commit 22ab800

Please sign in to comment.