Skip to content
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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions .github/workflows/pr-assistant.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: PR Assistant

on:
pull_request:
types: [opened, edited, synchronize]

permissions:
pull-requests: write
issues: write
contents: write

jobs:
pr-assistant:
runs-on: ubuntu-latest
steps:
- uses: codex-team/action-pr-assistant@master
with:
check: description
mode: draft
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "hawk.api",
"version": "1.2.28",
"version": "1.2.31",
"main": "index.ts",
"license": "BUSL-1.1",
"scripts": {
Expand Down
7 changes: 7 additions & 0 deletions src/models/user.ts
Original file line number Diff line number Diff line change
Expand Up @@ -371,9 +371,16 @@ export default class UserModel extends AbstractModel<UserDBScheme> implements Us
const res = [];

if (ids.length === 0) {
if (!this.workspaces) {
return [];
}
return Object.keys(this.workspaces);
}

if (!this.workspaces) {
return [];
}

for (const id of ids) {
const workspaceId = id.toString();
const workspace = this.workspaces[workspaceId];
Expand Down
4 changes: 4 additions & 0 deletions src/resolvers/project.js
Original file line number Diff line number Diff line change
Expand Up @@ -575,6 +575,10 @@ module.exports = {
const releasesFactory = factories.releasesFactory;
const releaseDoc = await releasesFactory.findByProjectAndRelease(project._id, release);

if (!releaseDoc) {
throw new UserInputError(`Release "${release}" not found for project (id: ${project._id})`);
}

let enrichedFiles = Array.isArray(releaseDoc.files) ? releaseDoc.files : [];

// If there are files to enrich, try to get their metadata
Expand Down
Loading