Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert "Remove GitHub Actions" #53

Closed
wants to merge 7 commits into from
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
2 changes: 1 addition & 1 deletion .env.test
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
NLP_CLIENT=JsonServerClient
GRAPH_API_CLIENT=JsonGraphQLServerClient

SKIP_SIGN_IN=true
SKIP_SIGN_IN=false
LOGTO_APP_ID=c50fkc9m2qraupnk8gwop
LOGTO_ENDPOINT_URL=https://lfsogx.logto.app/
LOGTO_API_RESOURCE_IDENTIFIER=https://test-api-resource.nexusgraph.com
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/ci-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,18 +39,18 @@
access_token: ${{ github.token }}

yml-md-style:
uses: QubitPi/hashicorp-aws/.github/workflows/yml-md-style-and-link-checks.yml@master
uses: QubitPi/hashistack/.github/workflows/yml-md-style-and-link-checks.yml@master

code-style:
name: React & TS Code Style Check
uses: QubitPi/hashicorp-aws/.github/workflows/ui-code-style.yml@master
uses: QubitPi/hashistack/.github/workflows/ui-code-style.yml@master
with:
node-version: 18

unit-tests:
name: Unit Tests
needs: [yml-md-style, code-style]
uses: QubitPi/hashicorp-aws/.github/workflows/ui-unit-test.yml@master
uses: QubitPi/hashistack/.github/workflows/ui-unit-test.yml@master
with:
node-version: 18

Expand Down Expand Up @@ -126,7 +126,7 @@
cd scripts
timeout 1m bash -c 'until ./remove-graph.sh; do sleep 3; done'
cd ../
- uses: QubitPi/hashicorp-aws/.github/actions/cypress-e2e@master
- uses: QubitPi/hashistack/.github/actions/cypress-e2e@master
with:
node-version: ${{ env.NODE_VERSION }}
start-strategy: ${{ matrix.start_strategy }}
Expand Down Expand Up @@ -159,7 +159,7 @@

- name: Format lighthouse score
id: format_lighthouse_score
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # 7.0.1

Check warning on line 162 in .github/workflows/ci-cd.yml

View workflow job for this annotation

GitHub Actions / yml-md-style / YAML Style Check

162:78 [comments] too few spaces before comment
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
Expand All @@ -171,7 +171,7 @@

- name: Add Lighthouse stats as comment
id: comment_to_pr
uses: marocchino/sticky-pull-request-comment@efaaab3fd41a9c3de579aba759d2552635e590fd # 2.8.0

Check warning on line 174 in .github/workflows/ci-cd.yml

View workflow job for this annotation

GitHub Actions / yml-md-style / YAML Style Check

174:95 [comments] too few spaces before comment
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
number: ${{ github.event.pull_request.number }}
Expand All @@ -191,7 +191,7 @@

documentation:
name: Test and Deploy Documentation to GitHub Pages
needs: e2e-tests
#needs: e2e-tests

Check warning on line 194 in .github/workflows/ci-cd.yml

View workflow job for this annotation

GitHub Actions / yml-md-style / YAML Style Check

194:6 [comments] missing starting space in comment
runs-on: ubuntu-latest
defaults:
run:
Expand All @@ -214,7 +214,7 @@
- name: Load CNAME
run: cp CNAME build/
- name: Deploy to GitHub Pages
if: github.ref == 'refs/heads/master'
#if: github.ref == 'refs/heads/master'

Check warning on line 217 in .github/workflows/ci-cd.yml

View workflow job for this annotation

GitHub Actions / yml-md-style / YAML Style Check

217:10 [comments] missing starting space in comment
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -229,7 +229,7 @@
if: github.ref == 'refs/heads/master'
runs-on: ubuntu-latest
steps:
- uses: QubitPi/hashicorp-aws/.github/actions/npm-release@master
- uses: QubitPi/hashistack/.github/actions/npm-release@master
with:
user: ${{ env.USER }}
email: ${{ env.EMAIL }}
Expand Down
6 changes: 3 additions & 3 deletions packages/nexusgraph-app/src/ProdApp.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,14 @@
import { StyledSpinner } from "./styled";

interface ProdAppProps {
initReduxStore: (userId: string, graphClient: GraphClient, dispatch: any) => void;

Check warning on line 31 in packages/nexusgraph-app/src/ProdApp.tsx

View workflow job for this annotation

GitHub Actions / React & TS Code Style Check / UI Code Style Job

Unexpected any. Specify a different type
}

const getUserPrimaryKeyId = (oidcId: string, accessToken: string): Promise<number | undefined> => {
return postGraphQuery(
`
{
user(filter: "oidcId==\"${oidcId}\"") {
user(filter: "oidcId==${oidcId}") {
edges {
node {
id
Expand All @@ -46,7 +46,7 @@
`,
accessToken
).then((response) => {
if (response.data.data.user.edges[0] == null) {
if (response.data.data.user.edges[0] == undefined) {
return undefined;
}

Expand All @@ -58,7 +58,7 @@
return postGraphQuery(
`
mutation {
user(op: UPSERT, data: {oidcId: "oidcId==\"${oidcId}\""}) {
user(op: UPSERT, data: {oidcId: "${oidcId}"}) {
edges {
node {
id
Expand Down Expand Up @@ -100,8 +100,8 @@
if (isAuthenticated) {
const logtoApiResource = process.env.LOGTO_API_RESOURCE_IDENTIFIER as string;
getAccessToken(logtoApiResource)
.then((accessToken: any) => {

Check warning on line 103 in packages/nexusgraph-app/src/ProdApp.tsx

View workflow job for this annotation

GitHub Actions / React & TS Code Style Check / UI Code Style Job

Unexpected any. Specify a different type
fetchUserInfo().then((userInfo: any) => {

Check warning on line 104 in packages/nexusgraph-app/src/ProdApp.tsx

View workflow job for this annotation

GitHub Actions / React & TS Code Style Check / UI Code Style Job

Unexpected any. Specify a different type
const userId = userInfo["sub"];

dispatch(
Expand Down
20 changes: 13 additions & 7 deletions packages/nexusgraph-db/src/graph/astraios/AstraiosGraphClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -135,24 +135,30 @@ export class AstraiosGraphClient implements GraphClient {
);
}

public getGraphListMetaDataByUserId(userId: string): Promise<GraphMetaData[]> {
public getGraphListMetaDataByUserId(oidcId: string): Promise<GraphMetaData[]> {
return postGraphQuery(
`
query getGraphListMetaDataByUserId {
graph(filter:"userId==${userId}") {
{
user(filter: "oidcId==${oidcId}") {
edges {
node {
id
name
graphs {
edges {
node {
id
name
}
}
}
}
}
}
}
`,
this._accessToken
).then((response) => {
return response.data.data.graph.edges.map((node: { node: any }) => {
const metadata = node.node;
return response.data.data.user.edges[0].node.graphs.edges.map((graph: { node: any }) => {
const metadata = graph.node;
return {
id: metadata.id,
name: metadata.name,
Expand Down
Loading