Skip to content

Commit

Permalink
Merge branch 'develop' into feature-2645/feedback-request-add-ability…
Browse files Browse the repository at this point in the history
…-to-request-feedback-from-external-source
  • Loading branch information
Luch76 committed Nov 4, 2024
2 parents 1b43786 + acdcac9 commit e41590f
Show file tree
Hide file tree
Showing 25 changed files with 193 additions and 169 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/gradle-build-feature.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ jobs:
uses: actions/checkout@v4
with:
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
- name: Set up Node LTS
- name: Set up Node Stable
uses: actions/setup-node@v4
with:
node-version: '20'
node-version: '22'
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/gradle-build-native-feature.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ jobs:
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Node LTS
- name: Set up Node Stable
uses: actions/setup-node@v4
with:
node-version: '20'
node-version: '22'
- name: Set up GraalVM 21
uses: graalvm/[email protected]
with:
Expand Down
64 changes: 21 additions & 43 deletions .github/workflows/gradle-build-production.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,28 +3,28 @@ on:
push:
branches:
- "master"

env:
PROJECT_ID: ${{ secrets.RUN_PROJECT }}
RUN_REGION: us-central1
SERVICE_NAME: checkins-master
TARGET_URL: https://checkins.objectcomputing.com
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
contents: 'read'
id-token: 'write'
environment:
name: Production
url: https://checkins.objectcomputing.com/
url: ${{ env.TARGET_URL }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
- name: Set up Node LTS
uses: actions/setup-node@v4
with:
node-version: '20'
node-version: '22'
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
Expand All @@ -36,42 +36,29 @@ jobs:
path: ~/.gradle/caches
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }}
restore-keys: ${{ runner.os }}-gradle
- name: Validate Gradle wrapper
uses: gradle/wrapper-validation-action@e6e38bacfdf1a337459f332974bb2327a31aaf4b
- name: Build with Gradle
uses: gradle/gradle-build-action@4137be6a8bf7d7133955359dbd952c0ca73b1021
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4
- id: 'auth'
uses: 'google-github-actions/auth@v2'
with:
arguments: assemble
env:
VITE_APP_API_URL: https://checkins.objectcomputing.com
# - name: Publish package
# uses: gradle/gradle-build-action@4137be6a8bf7d7133955359dbd952c0ca73b1021
# with:
# arguments: publish
# env:
# GITHUB_TOKEN: ${{ secrets.GIT_HUB_TOKEN }}
- name: Setup python
run: |
sudo apt-get install python2.7
- name: Export gcloud related env variable
run: export CLOUDSDK_PYTHON="/usr/bin/python2"
- name: Setup gcloud CLI
uses: google-github-actions/setup-gcloud@v0
project_id: 'oci-intern-2019'
workload_identity_provider: 'projects/832140020593/locations/global/workloadIdentityPools/github/providers/my-repo'
- name: 'Set up Cloud SDK'
uses: google-github-actions/setup-gcloud@v2
with:
version: "290.0.1"
service_account_key: ${{ secrets.RUN_SA_KEY }}
project_id: ${{ secrets.RUN_PROJECT }}
- name: Auth Configure Docker
version: '>= 363.0.0'
- name: 'Auth Configure Docker'
run: |-
gcloud --quiet auth configure-docker
- name: Build the Docker image
run: |-
./gradlew assemble
cd server
docker build --tag "gcr.io/$PROJECT_ID/$SERVICE_NAME:$GITHUB_SHA" .
env:
VITE_APP_API_URL: ${{ env.TARGET_URL }}
- name: Push the Docker image to Google Container Registry
run: |-
cd server
docker push "gcr.io/$PROJECT_ID/$SERVICE_NAME:$GITHUB_SHA"
run: docker push "gcr.io/$PROJECT_ID/$SERVICE_NAME:$GITHUB_SHA"
- name: Deploy image to Cloud Run
run: |-
gcloud run deploy "$SERVICE_NAME" \
Expand All @@ -89,21 +76,12 @@ jobs:
--set-env-vars "OAUTH_CLIENT_SECRET=${{ secrets.OAUTH_CLIENT_SECRET }}" \
--set-env-vars "OAUTH_CALLBACK_URI"=${{ secrets.OAUTH_CALLBACK_URI }} \
--set-env-vars "DIRECTORY_ID=${{ secrets.DIRECTORY_ID }}" \
--set-env-vars "TYPE=${{ secrets.SA_KEY_TYPE }}" \
--set-env-vars "PROJECT_ID=${{ secrets.RUN_PROJECT }}" \
--set-env-vars "PRIVATE_KEY_ID=${{ secrets.SA_PRIVATE_KEY_ID }}" \
--set-env-vars "PRIVATE_KEY=${{ secrets.SA_PRIVATE_KEY }}" \
--set-env-vars "CLIENT_EMAIL=${{ secrets.SA_CLIENT_EMAIL }}" \
--set-env-vars "CLIENT_ID=${{ secrets.SA_CLIENT_ID }}" \
--set-env-vars "AUTH_URI=${{ secrets.SA_AUTH_URI }}" \
--set-env-vars "TOKEN_URI=${{ secrets.SA_TOKEN_URI }}" \
--set-env-vars "AUTH_PROVIDER_X509_CERT_URL=${{ secrets.SA_AUTH_PROVIDER_X509_CERT_URL }}" \
--set-env-vars "CLIENT_X509_CERT_URL=${{ secrets.SA_CLIENT_X509_CERT_URL }}" \
--set-env-vars "SERVICE_ACCOUNT_CREDENTIALS=${{ secrets.SERVICE_ACCOUNT_CREDENTIALS }}" \
--set-env-vars "GSUITE_SUPER_ADMIN=${{ secrets.GSUITE_SUPER_ADMIN }}" \
--set-env-vars "MJ_APIKEY_PUBLIC=${{ secrets.MJ_APIKEY_PUBLIC }}" \
--set-env-vars "MJ_APIKEY_PRIVATE=${{ secrets.MJ_APIKEY_PRIVATE }}" \
--set-env-vars "GIT_HUB_TOKEN=${{ secrets.GIT_HUB_TOKEN }}" \
--set-env-vars "WEB_ADDRESS=https://checkins.objectcomputing.com" \
--set-env-vars "WEB_ADDRESS=${{ env.TARGET_URL }}" \
--set-env-vars "[email protected]" \
--set-env-vars "FROM_NAME=Check-Ins" \
--set-env-vars "^@^MICRONAUT_ENVIRONMENTS=cloud,google,gcp" \
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/gradle-build-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ jobs:
packages: write
steps:
- uses: actions/checkout@v4
- name: Set up Node LTS
- name: Set up Node Stable
uses: actions/setup-node@v2-beta
with:
node-version: '20'
node-version: '22'
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/gradle-deploy-develop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ jobs:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Node LTS
- name: Set up Node Stable
uses: actions/setup-node@v4
with:
node-version: '20'
node-version: '22'
- name: Set up Temurin 21
uses: actions/setup-java@v4
with:
Expand Down Expand Up @@ -49,7 +49,7 @@ jobs:
- name: Set up Node LTS
uses: actions/setup-node@v4
with:
node-version: '20'
node-version: '22'
- name: Set up Temurin 21
uses: actions/setup-java@v4
with:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/gradle-deploy-native-develop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ jobs:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Node LTS
- name: Set up Node Stable
uses: actions/setup-node@v4
with:
node-version: '20'
node-version: '22'
- name: Set up GraalVM 21
uses: graalvm/[email protected]
with:
Expand Down
2 changes: 1 addition & 1 deletion server/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ plugins {
id "jacoco"
}

version "0.7.0"
version "0.8.1"
group "com.objectcomputing.checkins"

repositories {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ public HttpResponse<ReviewAssignment> createReviewAssignment(@Body @Valid Review
public List<ReviewAssignment> createReviewAssignment(@NotNull UUID reviewPeriodId,
@Body List<@Valid ReviewAssignmentDTO> assignments) {
List<ReviewAssignment> assignmentEntities = assignments.stream().map(ReviewAssignmentDTO::convertToEntity).toList();
return reviewAssignmentServices.saveAll(reviewPeriodId, assignmentEntities, true);
return reviewAssignmentServices.saveAll(reviewPeriodId, assignmentEntities, false);
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
import org.slf4j.LoggerFactory;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.time.LocalTime;
import java.util.HashSet;
import java.util.List;
import java.util.Objects;
Expand Down Expand Up @@ -162,7 +163,7 @@ public ReviewPeriod update(@NotNull ReviewPeriod reviewPeriod) {
if (launchDate == null) {
throw new BadArgException("Cannot open a review period without a launch date.");
}
if (launchDate.isBefore(LocalDateTime.now())) {
if (launchDate.isBefore(LocalDateTime.now().with(LocalTime.MIN))) {
throw new BadArgException("Cannot open a review period with a launch date in the past.");
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import io.micronaut.scheduling.annotation.ExecuteOn;
import io.micronaut.security.annotation.Secured;
import io.micronaut.security.rules.SecurityRule;
import io.micronaut.cache.annotation.CacheInvalidate;
import jakarta.validation.constraints.NotNull;

import java.util.List;
Expand Down Expand Up @@ -34,6 +35,7 @@ HttpResponse<?> deleteMemberRole(@NotNull UUID roleId, @NotNull UUID memberId){
}

@Post
@CacheInvalidate(cacheNames = {"role-permission-cache"})
HttpResponse<MemberRole> saveMemberRole(@NotNull @Body MemberRoleId id){
MemberRole memberRole = memberRoleServices.saveByIds(id.getMemberId(), id.getRoleId());
return HttpResponse.ok(memberRole);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -701,7 +701,7 @@ void deleteReviewPeriodWithFeedbackRequests() {

@Test
void testOpenAReviewPeriodWithBadLaunchTime() {
LocalDateTime launchDate = LocalDateTime.now().minusMinutes(1);
LocalDateTime launchDate = LocalDateTime.now().minusDays(1);
LocalDateTime selfReviewCloseDate = launchDate.plusDays(1);
LocalDateTime closeDate = selfReviewCloseDate.plusDays(1);
LocalDateTime startDate = launchDate.minusDays(30);
Expand Down
8 changes: 5 additions & 3 deletions web-ui/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,22 @@
<html lang="en">
<head>
<meta charset="utf-8" />
<link rel="icon" href="favicon.ico" />
<link rel="icon" href="/favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="theme-color" content="#000000" />
<meta
name="description"
content="An open source team engagement platform"
/>
<link rel="apple-touch-icon" href="logo192.png" />
<link rel="apple-touch-icon" href="/logo192.png" />
<!--
manifest.json provides metadata used when your web app is installed on a
user's mobile device or desktop. See https://developers.google.com/web/fundamentals/web-app-manifest/
-->
<link rel="manifest" href="manifest.json" crossorigin="use-credentials" />
<link rel="manifest" href="/manifest.json" crossorigin="use-credentials" />
<!--
The use of %PUBLIC_URL% in the tags above causes a "URI malformed" error.
Notice the use of %PUBLIC_URL% in the tags above.
It will be replaced with the URL of the `public` folder during the build.
Only files inside the `public` folder can be referenced from the HTML.
Expand Down
2 changes: 1 addition & 1 deletion web-ui/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "web-ui",
"version": "0.7.0",
"version": "0.8.1",
"private": true,
"type": "module",
"dependencies": {
Expand Down
Binary file modified web-ui/public/favicon.ico
Binary file not shown.
Binary file modified web-ui/public/logo192.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified web-ui/public/logo512.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions web-ui/src/App.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,11 @@ const theme = extendTheme({
}
},
components: {
MuiButtonBase: {
defaultProps: {
disableRipple: !!process.env.VITEST_WORKER_ID, // No more ripple...only when testing.
},
},
MuiCssBaseline: {
styleOverrides: {
secondary: {
Expand Down
Loading

0 comments on commit e41590f

Please sign in to comment.