Skip to content

Commit 9b5d878

Browse files
authored
Merge pull request #4623 from coralproject/develop
v9.0.7
2 parents 3cad9ae + 1df2c6e commit 9b5d878

File tree

8 files changed

+28
-12
lines changed

8 files changed

+28
-12
lines changed

.github/workflows/build-and-test.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
- name: Checkout
1919
uses: actions/checkout@v3
2020
- name: Set up Docker Buildx
21-
uses: docker/setup-buildx-action@v2
21+
uses: docker/setup-buildx-action@v3
2222
- uses: webfactory/[email protected]
2323
with:
2424
ssh-private-key: ${{ secrets.REPO_PATCHED_DEPLOY_KEY }}
@@ -85,7 +85,7 @@ jobs:
8585
run: cd client && ./node_modules/.bin/bundlesize --enable-github-checks
8686
# Build tag push the image after a merge to develop
8787
- name: Build, Tag, Push
88-
uses: docker/build-push-action@v4
88+
uses: docker/build-push-action@v5
8989
if: github.ref == 'refs/heads/develop'
9090
with:
9191
push: true
@@ -96,7 +96,7 @@ jobs:
9696
cache-to: type=registry,ref=${{ env.IMAGE_CACHE_REPOSITORY }}:cache-develop
9797
# Build tag push the release candidate image when the branch name begins with release-
9898
- name: Build, Tag, Push RC
99-
uses: docker/build-push-action@v4
99+
uses: docker/build-push-action@v5
100100
if: startsWith( github.ref, 'refs/heads/release-')
101101
with:
102102
push: true

.github/workflows/build-test-deploy.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
- name: Checkout
2323
uses: actions/checkout@v3
2424
- name: Set up Docker Buildx
25-
uses: docker/setup-buildx-action@v2
25+
uses: docker/setup-buildx-action@v3
2626
- uses: webfactory/[email protected]
2727
with:
2828
ssh-private-key: ${{ secrets.REPO_PATCHED_DEPLOY_KEY }}
@@ -98,7 +98,7 @@ jobs:
9898
echo "MINOR_TAG=${MAJOR}.${MINOR}" >> $GITHUB_ENV
9999
echo "PATCH_TAG=${MAJOR}.${MINOR}.${PATCH}" >> $GITHUB_ENV
100100
- name: Build, Tag, Push Major Tag
101-
uses: docker/build-push-action@v4
101+
uses: docker/build-push-action@v5
102102
with:
103103
push: true
104104
tags: ${{ env.IMAGE_REPOSITORY }}:${{ env.MAJOR_TAG }}
@@ -107,7 +107,7 @@ jobs:
107107
cache-from: type=registry,ref=${{ env.IMAGE_CACHE_REPOSITORY }}:cache-major
108108
cache-to: type=registry,ref=${{ env.IMAGE_CACHE_REPOSITORY }}:cache-major
109109
- name: Build, Tag, Push Minor Tag
110-
uses: docker/build-push-action@v4
110+
uses: docker/build-push-action@v5
111111
with:
112112
push: true
113113
tags: ${{ env.IMAGE_REPOSITORY }}:${{ env.MINOR_TAG }}

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ FROM node:18-alpine
33
ENV NODE_OPTIONS="--max-old-space-size=8192 --openssl-legacy-provider --no-experimental-fetch"
44

55
# Install build dependancies.
6-
RUN apk --no-cache --update add g++ make git python3 \
6+
RUN apk --no-cache --update add g++ make git python3 py3-pip py3-setuptools \
77
&& rm -rf /var/cache/apk/*
88

99
RUN npm install -g [email protected]

client/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@coralproject/talk",
3-
"version": "9.0.6",
3+
"version": "9.0.7",
44
"author": "The Coral Project",
55
"homepage": "https://coralproject.net/",
66
"sideEffects": [

common/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "common",
3-
"version": "9.0.6",
3+
"version": "9.0.7",
44
"description": "",
55
"main": "dist/index.js",
66
"types": "dist/index.d.ts",

config/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "common",
3-
"version": "9.0.6",
3+
"version": "9.0.7",
44
"description": "",
55
"main": "dist/index.js",
66
"types": "dist/index.d.ts",

server/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@coralproject/talk",
3-
"version": "9.0.6",
3+
"version": "9.0.7",
44
"author": "The Coral Project",
55
"homepage": "https://coralproject.net/",
66
"sideEffects": [

server/src/core/server/graph/mutators/Actions.ts

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import {
88
GQLReviewCommentFlagInput,
99
} from "../schema/__generated__/types";
1010

11+
import { CommentNotFoundError, StoryNotFoundError } from "coral-server/errors";
1112
import { validateUserModerationScopes } from "./helpers";
1213

1314
export const Actions = (ctx: GraphContext) => ({
@@ -34,6 +35,17 @@ export const Actions = (ctx: GraphContext) => ({
3435
rejectComment: async (input: GQLRejectCommentInput) => {
3536
// Validate that this user is allowed to moderate this comment
3637
await validateUserModerationScopes(ctx, ctx.user!, input);
38+
39+
const comment = await ctx.loaders.Comments.comment.load(input.commentID);
40+
if (!comment) {
41+
throw new CommentNotFoundError(input.commentID);
42+
}
43+
44+
const story = await ctx.loaders.Stories.find.load({ id: comment.storyID });
45+
if (!story) {
46+
throw new StoryNotFoundError(comment.storyID);
47+
}
48+
3749
return rejectComment(
3850
ctx.mongo,
3951
ctx.redis,
@@ -47,7 +59,11 @@ export const Actions = (ctx: GraphContext) => ({
4759
input.commentRevisionID,
4860
ctx.user!.id,
4961
ctx.now,
50-
input.reason
62+
input.reason,
63+
undefined,
64+
ctx.req,
65+
true,
66+
story.isArchived || story.isArchiving
5167
);
5268
},
5369
reviewCommentFlag: async (input: GQLReviewCommentFlagInput) => {

0 commit comments

Comments
 (0)