Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
122 commits
Select commit Hold shift + click to select a range
01651e9
Add new project button to Sidebar Header
Jul 22, 2024
777d747
Adapt SecondaryHeader style to SidebarHeader
Jul 23, 2024
1142b32
Merge branch 'develop' into feature/add-new-project-button
simonbs Jul 23, 2024
4c477b6
Enable persistAuthorization for Swagger UI
ulrikandersen Jul 24, 2024
ae45880
Merge pull request #271 from shapehq/feature/swagger-persist-auth
ulrikandersen Jul 24, 2024
606b547
Merge branch 'main' into develop
simonbs Jul 24, 2024
67e5772
Bump @types/node from 20.14.11 to 20.14.12
dependabot[bot] Jul 24, 2024
feefac8
Merge pull request #274 from shapehq/sync-develop
simonbs Jul 24, 2024
6fae31f
Merge branch 'develop' into dependabot/npm_and_yarn/types/node-20.14.12
simonbs Jul 24, 2024
d7fe0a2
Bump yaml from 2.4.5 to 2.5.0
dependabot[bot] Jul 24, 2024
fdbeef6
Hides New Project button
simonbs Jul 25, 2024
444984a
Moves environment variable
simonbs Jul 25, 2024
0f686d3
Renames to NEXT_PUBLIC_SHAPE_DOCS_HELP_URL
simonbs Jul 25, 2024
40c615a
Merge pull request #276 from shapehq/dependabot/npm_and_yarn/yaml-2.5.0
simonbs Jul 25, 2024
4adf40f
Merge branch 'develop' into dependabot/npm_and_yarn/types/node-20.14.12
simonbs Jul 25, 2024
126ebab
Adds Help button
simonbs Jul 25, 2024
588f4cc
Reduces line length
simonbs Jul 25, 2024
3ac21b3
Merge pull request #277 from shapehq/dependabot/npm_and_yarn/types/no…
simonbs Jul 25, 2024
9f4742e
Merge branch 'develop' into feature/add-new-project-button
simonbs Jul 25, 2024
e146f9c
Fixes linting
simonbs Jul 25, 2024
5383da0
Adds FilteringGitHubRepositoryDataSource
simonbs Jul 25, 2024
017d9ee
Adapt conditional to falsy value on string
Jul 25, 2024
471b6f9
Reduces line length
Jul 25, 2024
f0fc183
Merge pull request #266 from shapehq/feature/add-new-project-button
simonbs Jul 25, 2024
91b87c9
Adds tests for GitHubRepositoryDataSource
simonbs Jul 25, 2024
57cd6df
Simplifies GitHubRepository model
simonbs Jul 25, 2024
2a8a700
Fixes GitHubProjectDataSource tests
simonbs Jul 25, 2024
37b747a
Merge branch 'develop' into feature/filter-repositories
simonbs Jul 25, 2024
5ea139d
Adds tests for FilteringGitHubRepositoryDataSource
simonbs Jul 25, 2024
660831c
Removes FilteringGitHubRepositoryDataSource
simonbs Jul 25, 2024
9d93462
Removes HIDDEN_REPOSITORIES
simonbs Jul 25, 2024
35f72dc
Revert "Removes FilteringGitHubRepositoryDataSource"
simonbs Jul 25, 2024
62bb532
Revert "Removes HIDDEN_REPOSITORIES"
simonbs Jul 25, 2024
7d2c385
Allows empty HIDDEN_REPOSITORIES
simonbs Jul 25, 2024
c3f9e63
GitHubLoginDataSource returns logins with avatars
simonbs Jul 25, 2024
4a10be1
Adds missing space
simonbs Jul 25, 2024
d093392
Adds back New Project button
simonbs Jul 25, 2024
2229a45
Moves interfaces
simonbs Jul 25, 2024
5bb7627
Merge branch 'enhancement/githubprojectdatasource-refactor' into enha…
simonbs Jul 25, 2024
61715bd
Merge branch 'enhancement/adds-avatars-to-logins' into feature/new-pr…
simonbs Jul 25, 2024
00910cc
Adds splitOwnerAndRepository
simonbs Jul 25, 2024
724e63d
Merge branch 'feature/filter-repositories' into enhancement/adds-avat…
simonbs Jul 25, 2024
9acb346
Merge branch 'enhancement/adds-avatars-to-logins' into feature/new-pr…
simonbs Jul 25, 2024
dcb2fba
Improves naming
simonbs Jul 25, 2024
4fc36ba
Merge branch 'feature/filter-repositories' into enhancement/adds-avat…
simonbs Jul 25, 2024
fd50dc3
Merge branch 'enhancement/adds-avatars-to-logins' into feature/new-pr…
simonbs Jul 25, 2024
9764ed1
Merge branch 'enhancement/githubprojectdatasource-refactor' into feat…
simonbs Jul 25, 2024
d47f091
Fixes lint warning
simonbs Jul 25, 2024
90134be
Reverts GitHubLogin type
simonbs Jul 25, 2024
a8a4af4
Adds NewProjectPage
simonbs Jul 25, 2024
af18ca6
Streamlines imports in tests
simonbs Jul 26, 2024
e41031c
Removes unneeded file
simonbs Jul 26, 2024
beca053
Removes unused types
simonbs Jul 26, 2024
fb700c0
Removes InvalidSessionPage
simonbs Jul 26, 2024
b269445
Rearchitects app to share sidebar in layout
simonbs Jul 26, 2024
af44f64
Removes _old_sidebar
simonbs Jul 26, 2024
de45dd9
Fixes linting errors
simonbs Jul 26, 2024
e503107
Moves sidebar types to internal
simonbs Jul 26, 2024
ff8651e
Truncates texts
simonbs Jul 26, 2024
ec4c86d
Removes unused comment
simonbs Jul 26, 2024
4da59f4
Removes extraneous whitspace
simonbs Jul 26, 2024
b8d077b
Reorders imports
simonbs Jul 26, 2024
0066059
Adds back header
simonbs Jul 26, 2024
6f7020c
Fixes toolbar being force shown
simonbs Jul 26, 2024
321f3dd
Moves canToggleSidebar to layout
simonbs Jul 26, 2024
8cc81c2
Uses React.ReactNode
simonbs Jul 26, 2024
0ab2896
Fixes linting warning
simonbs Jul 26, 2024
d18a6e2
Hides header when no project is selected
simonbs Jul 26, 2024
ddb0aff
Fixes sidebar not visible
simonbs Jul 26, 2024
3ed34f4
Merge branch 'feature/filter-repositories' into enhancement/restructu…
simonbs Jul 26, 2024
cc5d2aa
Adds dividers to project list when scrolled
simonbs Jul 26, 2024
b23ebfc
Bump next-auth from 5.0.0-beta.19 to 5.0.0-beta.20
dependabot[bot] Jul 29, 2024
66cafd8
Bump tailwindcss from 3.4.6 to 3.4.7
dependabot[bot] Jul 29, 2024
0fe523c
Merge pull request #278 from shapehq/enhancement/githubprojectdatasou…
simonbs Jul 29, 2024
6d70974
Merge branch 'develop' into feature/filter-repositories
simonbs Jul 29, 2024
ff0cd93
Merge pull request #279 from shapehq/feature/filter-repositories
simonbs Jul 29, 2024
f02a2d8
Merge branch 'develop' into enhancement/restructure-layout
simonbs Jul 29, 2024
e0fa02a
Merge pull request #281 from shapehq/enhancement/restructure-layout
simonbs Jul 29, 2024
e6afafe
Merge branch 'develop' into enhancement/adds-project-list-dividers
simonbs Jul 29, 2024
b962960
Merge pull request #282 from shapehq/enhancement/adds-project-list-di…
simonbs Jul 29, 2024
5058207
Merge branch 'develop' into dependabot/npm_and_yarn/next-auth-5.0.0-b…
simonbs Jul 29, 2024
126980f
Merge pull request #283 from shapehq/dependabot/npm_and_yarn/next-aut…
simonbs Jul 29, 2024
d82f0b1
Merge branch 'develop' into dependabot/npm_and_yarn/tailwindcss-3.4.7
simonbs Jul 29, 2024
3a9d4c4
Bump @mui/icons-material from 5.16.4 to 5.16.5
dependabot[bot] Jul 29, 2024
ee86f34
Update dependabot.yml
simonbs Jul 29, 2024
45897b0
Merge pull request #287 from shapehq/dependabot/npm_and_yarn/tailwind…
simonbs Jul 29, 2024
b64d1b1
Merge branch 'develop' into dependabot/npm_and_yarn/mui/icons-materia…
simonbs Jul 29, 2024
11cbc95
Merge pull request #285 from shapehq/dependabot/npm_and_yarn/mui/icon…
simonbs Jul 29, 2024
d6fcebe
Bump @mui/material from 5.16.4 to 5.16.5
dependabot[bot] Jul 29, 2024
a5896a0
Merge pull request #286 from shapehq/dependabot/npm_and_yarn/mui/mate…
simonbs Jul 29, 2024
3f343d2
Bump @types/node from 20.14.12 to 22.0.0
dependabot[bot] Jul 29, 2024
ac2efa3
Merge pull request #284 from shapehq/dependabot/npm_and_yarn/types/no…
simonbs Jul 29, 2024
b1080d2
Merge branch 'develop' into enhancement/dependabot-mui-group
simonbs Jul 29, 2024
5c5982c
Merge pull request #288 from shapehq/enhancement/dependabot-mui-group
simonbs Jul 29, 2024
59df759
Bump @auth/pg-adapter from 1.4.1 to 1.4.2
dependabot[bot] Jul 29, 2024
efe1750
Merge pull request #289 from shapehq/dependabot/npm_and_yarn/auth/pg-…
simonbs Jul 29, 2024
ff89e09
Bump postcss from 8.4.39 to 8.4.40
dependabot[bot] Jul 29, 2024
afa3a59
Merge pull request #290 from shapehq/dependabot/npm_and_yarn/postcss-…
simonbs Jul 29, 2024
4cbd8be
Styles Safari scrollbars
simonbs Jul 29, 2024
85bf4ad
Uses colors with opacity
simonbs Jul 29, 2024
2ea28ad
Merge pull request #291 from shapehq/enhancement/styles-scrollbar-in-…
simonbs Jul 29, 2024
ca37741
Removes margin to dividers
simonbs Jul 29, 2024
07ed866
Removes bottom margin
simonbs Jul 29, 2024
28ed043
Merge branch 'develop' into enhancement/streamline-dividers
simonbs Jul 29, 2024
84ff53f
Merge pull request #292 from shapehq/enhancement/streamline-dividers
simonbs Jul 29, 2024
88ee74e
Refreshes design of project list
simonbs Jul 29, 2024
d528c14
Merge pull request #293 from shapehq/enhancement/refreshes-project-list
simonbs Jul 30, 2024
ba6530b
Reduces exported auth types
simonbs Jul 30, 2024
ad64c35
Installs Font Awesome brand icons
simonbs Jul 30, 2024
c51686d
Adds custom sign in page
simonbs Jul 30, 2024
8bc05f1
Merge branch 'develop' into enhancement/custom-signin-page
simonbs Jul 30, 2024
9b57fe9
Increases size required for two columns
simonbs Jul 30, 2024
67eff14
Decreases padding on small screens
simonbs Jul 30, 2024
4db8422
Fixes mobile display
simonbs Jul 30, 2024
5a0817c
Increases padding of GitHub button
simonbs Jul 30, 2024
da81b8c
Updates login screenshot
simonbs Jul 30, 2024
1abccc1
Hides New Project button
simonbs Jul 30, 2024
6a40f50
Removes debug log
simonbs Jul 30, 2024
e510020
Fixes linting errors
simonbs Jul 30, 2024
88e2e9e
Merge pull request #295 from shapehq/enhancement/hide-new-project
simonbs Jul 30, 2024
41c1db0
Merge branch 'develop' into enhancement/custom-signin-page
simonbs Jul 30, 2024
d8ed542
Merge pull request #294 from shapehq/enhancement/custom-signin-page
simonbs Jul 30, 2024
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
3 changes: 3 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ SHAPE_DOCS_BASE_URL=http://localhost:3000
SHAPE_DOCS_PROJECT_CONFIGURATION_FILENAME=.shape-docs.yml
NEXT_PUBLIC_SHAPE_DOCS_TITLE=Shape Docs
NEXT_PUBLIC_SHAPE_DOCS_DESCRIPTION=Documentation for Shape's APIs
NEXT_PUBLIC_SHAPE_DOCS_HELP_URL=https://github.com/shapehq/shape-docs/wiki
NEXTAUTH_URL_INTERNAL=http://localhost:3000
NEXTAUTH_SECRET=use [openssl rand -base64 32] to generate a 32 bytes value
REDIS_URL=localhost
Expand All @@ -10,6 +11,8 @@ POSTGRESQL_USER=dbuser
POSTGRESQL_PASSWORD=
POSTGRESQL_DB=shape-docs
REPOSITORY_NAME_SUFFIX=-openapi
HIDDEN_REPOSITORIES=
NEW_PROJECT_TEMPLATE_REPOSITORY=shapehq/starter-openapi
GITHUB_WEBHOOK_SECRET=preshared secret also put in app configuration in GitHub
GITHUB_WEBHOK_REPOSITORY_ALLOWLIST=
GITHUB_WEBHOK_REPOSITORY_DISALLOWLIST=
Expand Down
3 changes: 3 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,6 @@ updates:
octokit:
patterns:
- "@octokit/*"
mui:
patterns:
- "@mui/*"
2 changes: 1 addition & 1 deletion __test__/auth/AuthjsAccountsOAuthTokenRepository.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { AuthjsAccountsOAuthTokenRepository } from "../../src/features/auth/domain"
import { AuthjsAccountsOAuthTokenRepository } from "@/features/auth/domain"

test("It gets token for user ID and provider", async () => {
let queryUserId: string | undefined
Expand Down
2 changes: 1 addition & 1 deletion __test__/auth/CompositeLogOutHandler.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { CompositeLogOutHandler } from "../../src/features/auth/domain"
import { CompositeLogOutHandler } from "@/features/auth/domain"

test("It invokes all log out handlers", async () => {
let didCallLogOutHandler1 = false
Expand Down
2 changes: 1 addition & 1 deletion __test__/auth/ErrorIgnoringLogOutHandler.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ErrorIgnoringLogOutHandler } from "../../src/features/auth/domain"
import { ErrorIgnoringLogOutHandler } from "@/features/auth/domain"

test("It ignores errors", async () => {
const sut = new ErrorIgnoringLogOutHandler({
Expand Down
2 changes: 1 addition & 1 deletion __test__/auth/LockingAccessTokenRefresher.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { LockingOAuthTokenRefresher } from "../../src/features/auth/domain"
import { LockingOAuthTokenRefresher } from "@/features/auth/domain"

test("It acquires a lock", async () => {
let didAcquireLock = false
Expand Down
2 changes: 1 addition & 1 deletion __test__/auth/LogInHandler.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { LogInHandler } from "../../src/features/auth/domain"
import { LogInHandler } from "@/features/auth/domain"

test("It disallows logging in when account is undefined", async () => {
const sut = new LogInHandler({
Expand Down
2 changes: 1 addition & 1 deletion __test__/auth/OAuthTokenDataSource.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { OAuthTokenDataSource } from "../../src/features/auth/domain"
import { OAuthTokenDataSource } from "@/features/auth/domain"

test("It reads OAuth token for user's ID", async () => {
let readUserId: string | undefined
Expand Down
2 changes: 1 addition & 1 deletion __test__/auth/OAuthTokenRepository.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { OAuthTokenRepository } from "../../src/features/auth/domain"
import { OAuthTokenRepository } from "@/features/auth/domain"

test("It reads the auth token for the specified user", async () => {
let readProvider: string | undefined
Expand Down
2 changes: 1 addition & 1 deletion __test__/auth/OAuthTokenSessionValidator.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { OAuthTokenSessionValidator, SessionValidity } from "../../src/features/auth/domain"
import { OAuthTokenSessionValidator, SessionValidity } from "@/features/auth/domain"

test("It reads the access token", async () => {
let didReadOAuthToken = false
Expand Down
2 changes: 1 addition & 1 deletion __test__/auth/PersistingOAuthTokenRefresher.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { PersistingOAuthTokenRefresher, OAuthToken } from "../../src/features/auth/domain"
import { PersistingOAuthTokenRefresher, OAuthToken } from "@/features/auth/domain"

test("It refreshes OAuth token using provided refresh token", async () => {
let usedRefreshToken: string | undefined
Expand Down
2 changes: 1 addition & 1 deletion __test__/auth/UserDataCleanUpLogOutHandler.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { UserDataCleanUpLogOutHandler } from "../../src/features/auth/domain"
import { UserDataCleanUpLogOutHandler } from "@/features/auth/domain"

test("It deletes data for the read user ID", async () => {
let deletedUserId: string | undefined
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { OAuthTokenRefreshingGitHubClient } from "@/common"
import {
OAuthTokenRefreshingGitHubClient,
GraphQLQueryRequest,
GetRepositoryContentRequest,
GetPullRequestCommentsRequest,
AddCommentToPullRequestRequest
} from "@/common/github/IGitHubClient"
} from "@/common"

test("It forwards a GraphQL request", async () => {
let forwardedRequest: GraphQLQueryRequest | undefined
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import listFromCommaSeparatedString from "@/common/utils/listFromCommaSeparatedString"
import { listFromCommaSeparatedString } from "@/common"

test("It returns an empty list given undefined", async () => {
const result = listFromCommaSeparatedString(undefined)
Expand Down
2 changes: 1 addition & 1 deletion __test__/common/utils/saneParseInt.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import saneParseInt from "@/common/utils/saneParseInt"
import { saneParseInt } from "@/common"

test("It parses an integer", async () => {
// @ts-ignore
Expand Down
2 changes: 1 addition & 1 deletion __test__/hooks/FilteringPullRequestEventHandler.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { FilteringPullRequestEventHandler } from "../../src/features/hooks/domain"
import { FilteringPullRequestEventHandler } from "@/features/hooks/domain"

test("It calls pullRequestOpened(_:) when event is included", async () => {
let didCall = false
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { PostCommentPullRequestEventHandler } from "../../src/features/hooks/domain"
import { PostCommentPullRequestEventHandler } from "@/features/hooks/domain"

test("It comments when opening a pull request", async () => {
let didComment = false
Expand Down
2 changes: 1 addition & 1 deletion __test__/hooks/PullRequestCommenter.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { PullRequestCommenter } from "../../src/features/hooks/domain"
import { PullRequestCommenter } from "@/features/hooks/domain"

test("It adds comment when none exist", async () => {
let didAddComment = false
Expand Down
2 changes: 1 addition & 1 deletion __test__/hooks/RepositoryNameEventFilter.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { RepositoryNameEventFilter } from "../../src/features/hooks/domain"
import { RepositoryNameEventFilter } from "@/features/hooks/domain"

test("It does not include repositories that do not have the \"-openapi\" suffix", async () => {
const sut = new RepositoryNameEventFilter({
Expand Down
2 changes: 1 addition & 1 deletion __test__/projects/CachingProjectDataSource.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Project, CachingProjectDataSource } from "../../src/features/projects/domain"
import { Project, CachingProjectDataSource } from "@/features/projects/domain"

test("It caches projects read from the data source", async () => {
const projects: Project[] = [{
Expand Down
125 changes: 125 additions & 0 deletions __test__/projects/FilteringGitHubRepositoryDataSource.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,125 @@
import { FilteringGitHubRepositoryDataSource } from "@/features/projects/domain"

test("It returns all repositories when no hidden repositories are provided", async () => {
const sut = new FilteringGitHubRepositoryDataSource({
hiddenRepositories: [],
dataSource: {
async getRepositories() {
return [{
owner: "acme",
name: "foo-openapi",
defaultBranchRef: {
id: "12345678",
name: "main"
},
branches: [],
tags: []
}, {
owner: "acme",
name: "bar-openapi",
defaultBranchRef: {
id: "12345678",
name: "bar"
},
branches: [],
tags: []
}]
}
}
})
const repositories = await sut.getRepositories()
expect(repositories.length).toEqual(2)
})

test("It removes hidden repository", async () => {
const sut = new FilteringGitHubRepositoryDataSource({
hiddenRepositories: ["acme/foo-openapi"],
dataSource: {
async getRepositories() {
return [{
owner: "acme",
name: "foo-openapi",
defaultBranchRef: {
id: "12345678",
name: "main"
},
branches: [],
tags: []
}, {
owner: "acme",
name: "bar-openapi",
defaultBranchRef: {
id: "12345678",
name: "bar"
},
branches: [],
tags: []
}]
}
}
})
const repositories = await sut.getRepositories()
expect(repositories.length).toEqual(1)
})

test("It returns unmodified list when hidden repository was not found", async () => {
const sut = new FilteringGitHubRepositoryDataSource({
hiddenRepositories: ["acme/baz-openapi"],
dataSource: {
async getRepositories() {
return [{
owner: "acme",
name: "foo-openapi",
defaultBranchRef: {
id: "12345678",
name: "main"
},
branches: [],
tags: []
}, {
owner: "acme",
name: "bar-openapi",
defaultBranchRef: {
id: "12345678",
name: "bar"
},
branches: [],
tags: []
}]
}
}
})
const repositories = await sut.getRepositories()
expect(repositories.length).toEqual(2)
})

test("It removes multiple hidden repositories", async () => {
const sut = new FilteringGitHubRepositoryDataSource({
hiddenRepositories: ["acme/foo-openapi", "acme/bar-openapi"],
dataSource: {
async getRepositories() {
return [{
owner: "acme",
name: "foo-openapi",
defaultBranchRef: {
id: "12345678",
name: "main"
},
branches: [],
tags: []
}, {
owner: "acme",
name: "bar-openapi",
defaultBranchRef: {
id: "12345678",
name: "bar"
},
branches: [],
tags: []
}]
}
}
})
const repositories = await sut.getRepositories()
expect(repositories.length).toEqual(0)
})
Loading