Skip to content
Closed
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
61 changes: 32 additions & 29 deletions .github/workflows/nextjs_bundle_analysis.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright (c) HashiCorp, Inc.
# SPDX-License-Identifier: MPL-2.0

name: 'Next.js Bundle Analysis'

on:
Expand All @@ -12,24 +15,36 @@ defaults:
# change this if your nextjs app does not live at the root of the repo
working-directory: ./

permissions:
contents: read # for checkout repository
actions: read # for fetching base branch bundle stats
pull-requests: write # for comments

jobs:
analyze:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: Set up node
uses: actions/setup-node@v1
- name: Install Node.js
uses: actions/setup-node@v3
with:
node-version: '15.x'
node-version: 18

- name: Install dependencies
uses: bahmutov/npm-install@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

# If pnpm is used, you need to switch the previous step with the following one. pnpm does not create a package-lock.json
# so the step above will fail to pull dependencies
# - uses: pnpm/action-setup@v2
# name: Install pnpm
# id: pnpm-install
# with:
# version: 7
# run_install: true

- name: Restore next build
uses: actions/cache@v2
uses: actions/cache@v3
id: restore-build-cache
env:
cache-name: cache-next-build
Expand All @@ -42,30 +57,19 @@ jobs:

- name: Build next.js app
# change this if your site requires a custom build command
run: npm run build
env:
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
ANALYZE: 'true'

run: ./node_modules/.bin/next build

# Here's the first place where next-bundle-analysis' own script is used
# This step pulls the raw bundle stats for the current bundle
- name: Analyze bundle
run: npx -p nextjs-bundle-analysis report

- name: Upload bundle
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v3
with:
name: bundle
path: .next/analyze/__bundle_analysis.json

- name: Upload packages analyzer
uses: actions/upload-artifact@v4
with:
name: bundle-packages
path: .next/analyze/

- name: Download base branch bundle stats
uses: dawidd6/action-download-artifact@v2
if: success() && github.event.number
Expand All @@ -91,33 +95,32 @@ jobs:
if: success() && github.event.number
run: ls -laR .next/analyze/base && npx -p nextjs-bundle-analysis compare

- name: Get comment body
- name: Get Comment Body
id: get-comment-body
if: success() && github.event.number
# https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#multiline-strings
run: |
body=$(cat .next/analyze/__bundle_analysis_comment.txt)
body="${body//'%'/'%25'}"
body="${body//$'\n'/'%0A'}"
body="${body//$'\r'/'%0D'}"
echo ::set-output name=body::$body
echo "body<<EOF" >> $GITHUB_OUTPUT
echo "$(cat .next/analyze/__bundle_analysis_comment.txt)" >> $GITHUB_OUTPUT
echo EOF >> $GITHUB_OUTPUT

- name: Find Comment
uses: peter-evans/find-comment@v1
uses: peter-evans/find-comment@v2
if: success() && github.event.number
id: fc
with:
issue-number: ${{ github.event.number }}
body-includes: '<!-- __NEXTJS_BUNDLE -->'

- name: Create Comment
uses: peter-evans/create-or-update-comment@v1.4.4
uses: peter-evans/create-or-update-comment@v2
if: success() && github.event.number && steps.fc.outputs.comment-id == 0
with:
issue-number: ${{ github.event.number }}
body: ${{ steps.get-comment-body.outputs.body }}

- name: Update Comment
uses: peter-evans/create-or-update-comment@v1.4.4
uses: peter-evans/create-or-update-comment@v2
if: success() && github.event.number && steps.fc.outputs.comment-id != 0
with:
issue-number: ${{ github.event.number }}
Expand Down
4 changes: 4 additions & 0 deletions lang/pt-BR.json
Original file line number Diff line number Diff line change
Expand Up @@ -1291,6 +1291,10 @@
"defaultMessage": "para <highlight>{confidence}</highlight>",
"description": "This text is displayed as the second line of our confidence tooltip"
},
"IldkUk": {
"defaultMessage": "Filtros",
"description": "This is the default placeholder while selecting a given value in a select menu"
},
"IoZbDV": {
"defaultMessage": "Deseja excluir esse comentário?",
"description": "This message appears in delete modal confirmation."
Expand Down
155 changes: 0 additions & 155 deletions lib/fake-api/db.task-management.json

This file was deleted.

3 changes: 0 additions & 3 deletions lib/fake-api/routes.json

This file was deleted.

3 changes: 3 additions & 0 deletions public/icons/check.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import ClockIcon from 'src/components/Icon/Clock'
import LowPriorityIcon from 'src/components/Icon/LowPriorityIcon'
import MediumPriorityIcon from 'src/components/Icon/MediumPriorityIcon'
import { User } from 'src/components/User/types'
import { TASK_STATUS } from 'src/services/task-management/task-management.service'
import { TASK_STATUS } from 'src/services/task-management/@types/task-status.enum'
import selectUser from 'src/state/recoil/user/selector'

import { TaskPriority } from './kanban-task-card-root'
Expand Down
2 changes: 1 addition & 1 deletion src/components/Cycle/hooks/use-get-team-cycle.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export function useTeamCycleData(teamId: string) {
queryKey: [`${MODULE}:${ACTION}:${teamId}`],
queryFn: async () => {
const { cycle } = await servicesPromise
const data = await cycle.getCycleTeam(teamId)
const data = await cycle.getTeamCycle(teamId)
return data
},
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ import { useRecoilValue } from 'recoil'

import { EditableInputField } from 'src/components/Base'
import { PlusOutline } from 'src/components/Icon'
import { useAddTask } from 'src/components/KeyResult/hooks/use-add-task-new'
import { NewTask } from 'src/components/Task/types'
import { useAddTask } from 'src/components/TaskManagement/hooks/use-add-task-new'
import { TASK_STATUS } from 'src/services/new-task-management/@types/task-status.enum'
import { TASK_STATUS } from 'src/services/task-management/@types/task-status.enum'
import { keyResultAtomFamily } from 'src/state/recoil/key-result'
import meAtom from 'src/state/recoil/user/me'

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React, { Ref } from 'react'
import { useIntl } from 'react-intl'

import { DeleteButton } from 'src/components/Base/Button/delete-button'
import { useDeleteTaskByKr } from 'src/components/TaskManagement/hooks/use-delete-tasks'
import { useDeleteTaskByKr } from 'src/components/KeyResult/hooks/use-delete-tasks'

import messages from './messages'

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import { Stack, StyleProps } from '@chakra-ui/react'
import styled from '@emotion/styled'
import React, { useRef } from 'react'

import { Task } from 'src/services/new-task-management/@types/task.type'
import { TaskSummary } from 'src/services/okr/key-result/@types'
import { Task } from 'src/services/task-management/@types/task.type'

import { CreateTaskButton } from './ActionButtons/create-task-in-kr'
import { InlineTaskList } from './inline-tasklist'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ export const useDeleteTask = () => {

return useMutation({
mutationFn: async ({ taskId }: { taskId: string }) => {
const { newTaskManagement } = await servicesPromise
return newTaskManagement.removeTask(taskId)
const { taskManagement } = await servicesPromise
return taskManagement.removeTask(taskId)
},
onSuccess: (_data, variables) => {
queryClient.invalidateQueries({ queryKey: [`${MODULE}:${ACTION}:${variables.taskId}`] })
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@ import { useMutation, useQueryClient } from '@tanstack/react-query'
import { useContext } from 'react'

import { ServicesContext } from 'src/components/Base/ServicesProvider/services-provider'
import { TaskUpdate } from 'src/services/new-task-management/@types/task-update.type'
import { TaskUpdate } from 'src/services/task-management/@types/task-update.type'

export function useUpdateTask({ userId }: { userId: string }) {
const { servicesPromise } = useContext(ServicesContext)
const queryClient = useQueryClient()

const updateTaskMutate = useMutation({
mutationFn: async ({ taskId, data }: { taskId: string; data: Partial<TaskUpdate> }) => {
const { newTaskManagement } = await servicesPromise
const response = await newTaskManagement.updateTask(taskId, data)
const { taskManagement } = await servicesPromise
const response = await taskManagement.updateTask(taskId, data)
return response
},
onSuccess: (_data, _variables) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ import { useRecoilValue } from 'recoil'
import { EditableInputField } from 'src/components/Base'
import { NamedAvatar } from 'src/components/User'
import { AllReachableUsers } from 'src/components/User/AllReachableUsers/wrapper'
import { TASK_STATUS } from 'src/services/new-task-management/@types/task-status.enum'
import { Task } from 'src/services/new-task-management/@types/task.type'
import { TaskSummary } from 'src/services/okr/key-result/@types'
import { TASK_STATUS } from 'src/services/task-management/@types/task-status.enum'
import { Task } from 'src/services/task-management/@types/task.type'
import meAtom from 'src/state/recoil/user/me'

import { DeleteTaskButton } from './ActionButtons/delete-task'
Expand Down
Loading
Loading