This repository has been archived by the owner on Apr 18, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into PLATE-838
- Loading branch information
Showing
15 changed files
with
120 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,7 +16,7 @@ jobs: | |
- uses: hmarr/[email protected] | ||
|
||
- name: Add Workflow link to command comment | ||
uses: peter-evans/create-or-update-comment@v3 | ||
uses: peter-evans/create-or-update-comment@v4 | ||
with: | ||
token: ${{ secrets.GIT_PAT }} | ||
repository: ${{ github.event.client_payload.github.payload.repository.full_name }} | ||
|
@@ -50,7 +50,7 @@ jobs: | |
echo "merge_conflict=$(git merge-tree $(git merge-base HEAD origin/$SLASH_COMMAND_ARG_BRANCH) origin/$SLASH_COMMAND_ARG_BRANCH HEAD | grep '<<')" >> $GITHUB_OUTPUT | ||
- name: Add reaction to command comment on merge conflict | ||
uses: peter-evans/create-or-update-comment@v3 | ||
uses: peter-evans/create-or-update-comment@v4 | ||
if: ${{ steps.check-conflict.outputs.merge_conflict }} | ||
with: | ||
token: ${{ secrets.GIT_PAT }} | ||
|
@@ -81,7 +81,7 @@ jobs: | |
- name: Add reaction to command comment on nothing to do | ||
if: ${{ !steps.check-conflict.outputs.merge_conflict && steps.commit_and_push.outputs.changes == 'no' }} | ||
uses: peter-evans/create-or-update-comment@v3 | ||
uses: peter-evans/create-or-update-comment@v4 | ||
with: | ||
token: ${{ secrets.GIT_PAT }} | ||
repository: ${{ github.event.client_payload.github.payload.repository.full_name }} | ||
|
@@ -92,7 +92,7 @@ jobs: | |
|
||
- name: Add reaction to command comment on success | ||
if: ${{ !steps.check-conflict.outputs.merge_conflict && steps.commit_and_push.outputs.changes == 'yes' }} | ||
uses: peter-evans/create-or-update-comment@v3 | ||
uses: peter-evans/create-or-update-comment@v4 | ||
with: | ||
token: ${{ secrets.GIT_PAT }} | ||
repository: ${{ github.event.client_payload.github.payload.repository.full_name }} | ||
|
@@ -103,7 +103,7 @@ jobs: | |
reactions: "+1" | ||
|
||
- name: Add reaction to command comment on failure | ||
uses: peter-evans/create-or-update-comment@v3 | ||
uses: peter-evans/create-or-update-comment@v4 | ||
if: failure() | ||
with: | ||
token: ${{ secrets.GIT_PAT }} | ||
|
@@ -119,7 +119,7 @@ jobs: | |
timeout-minutes: 1 | ||
steps: | ||
- name: Update comment | ||
uses: peter-evans/create-or-update-comment@v3 | ||
uses: peter-evans/create-or-update-comment@v4 | ||
with: | ||
token: ${{ secrets.GIT_PAT }} | ||
repository: ${{ github.event.client_payload.github.payload.repository.full_name }} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,7 +16,7 @@ jobs: | |
- uses: hmarr/[email protected] | ||
|
||
- name: Add Workflow link to command comment | ||
uses: peter-evans/create-or-update-comment@v3 | ||
uses: peter-evans/create-or-update-comment@v4 | ||
with: | ||
token: ${{ secrets.GIT_PAT }} | ||
repository: ${{ github.event.client_payload.github.payload.repository.full_name }} | ||
|
@@ -64,7 +64,7 @@ jobs: | |
type: ${{ github.event.client_payload.slash_command.args.unnamed.arg2 || 'task' }} | ||
|
||
- name: Add reaction to command comment on success | ||
uses: peter-evans/create-or-update-comment@v3 | ||
uses: peter-evans/create-or-update-comment@v4 | ||
with: | ||
token: ${{ secrets.GIT_PAT }} | ||
repository: ${{ github.event.client_payload.github.payload.repository.full_name }} | ||
|
@@ -74,7 +74,7 @@ jobs: | |
reactions: "+1" | ||
|
||
- name: Add reaction to command comment on failure | ||
uses: peter-evans/create-or-update-comment@v3 | ||
uses: peter-evans/create-or-update-comment@v4 | ||
if: failure() | ||
with: | ||
token: ${{ secrets.GIT_PAT }} | ||
|
@@ -91,7 +91,7 @@ jobs: | |
timeout-minutes: 1 | ||
steps: | ||
- name: Update comment | ||
uses: peter-evans/create-or-update-comment@v3 | ||
uses: peter-evans/create-or-update-comment@v4 | ||
with: | ||
token: ${{ secrets.GIT_PAT }} | ||
repository: ${{ github.event.client_payload.github.payload.repository.full_name }} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
import { getRoot } from "mobx-state-tree"; | ||
import { Fragment } from "react"; | ||
|
||
const ProjectLink = ({ project }) => { | ||
const projectID = project.id; | ||
const onClick = (e) => { | ||
e.stopPropagation(); | ||
|
||
}; | ||
|
||
return ( | ||
<a href={`/projects/${projectID}/data`} onClick={onClick}> | ||
{project.title} | ||
</a> | ||
); | ||
}; | ||
|
||
export const ProjectCell = (cell) => { | ||
const { original, value } = cell; | ||
const root = getRoot(original); | ||
const projectList = value | ||
.map(projectRef => root.taskStore.associatedList.find(proj => proj.id === projectRef.project_id)) | ||
.filter(Boolean); | ||
|
||
return ( | ||
<div | ||
style={{ | ||
maxHeight: "100%", | ||
overflow: "hidden", | ||
fontSize: 12, | ||
lineHeight: "16px", | ||
}} | ||
> | ||
{projectList && ( | ||
projectList | ||
.map((projectRef, index) => ( | ||
<Fragment key={projectRef.project_id}> | ||
{index > 0 && ", "} | ||
<ProjectLink project={projectRef} /> | ||
</Fragment> | ||
)) | ||
)} | ||
</div> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,31 @@ | ||
const valueToString = (value) => { | ||
import { format, isValid } from "date-fns"; | ||
import { dateTimeFormat } from "./DateTimeCell"; | ||
|
||
export const valueToString = (value) => { | ||
if (typeof value === "string") return value; | ||
/* if undefined or null we'll treat it as empty string */ | ||
if (value === undefined || value === null) return ""; | ||
if (value instanceof Date && isValid(value)) return format(value, dateTimeFormat); | ||
|
||
try { | ||
/* JSON.stringify will handle JSON and non-strings, non-null, non-undefined */ | ||
return JSON.stringify(value); | ||
} catch { | ||
return value.toString(); | ||
return 'Error: Invalid JSON'; | ||
} | ||
}; | ||
|
||
export const StringCell = ({ value }) => { | ||
const style = { | ||
maxHeight: "100%", | ||
overflow: "hidden", | ||
fontSize: 12, | ||
lineHeight: "16px", | ||
}; | ||
|
||
return ( | ||
<div | ||
style={{ | ||
maxHeight: "100%", | ||
overflow: "hidden", | ||
fontSize: 12, | ||
lineHeight: "16px", | ||
}} | ||
> | ||
{value ? valueToString(value) : ""} | ||
<div style={style}> | ||
{valueToString(value)} | ||
</div> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.