Skip to content

Commit

Permalink
Update issue/comment mocks (#1253)
Browse files Browse the repository at this point in the history
* update avatar asset in issue mocks

* subtract all of the personal information from the mock

* clean up
  • Loading branch information
OlegMoshkovich authored Aug 7, 2024
1 parent b80bb7b commit f98bead
Show file tree
Hide file tree
Showing 4 changed files with 128 additions and 137 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "bldrs",
"version": "1.0.1081",
"version": "1.0.1086",
"main": "src/index.jsx",
"license": "AGPL-3.0",
"homepage": "https://github.com/bldrs-ai/Share",
Expand Down
2 changes: 0 additions & 2 deletions src/Components/Notes/Notes.fixture.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ export const MOCK_NOTES = [
body: 'BLDRS aims to enable asynchronous workflows by integrating essential communication channels and open standard.',
date: '2022-06-01T22:10:49Z',
username: 'TEST_ISSUE_USERNAME',
avatarUrl: 'https://avatars.githubusercontent.com/u/3433606?v=4',
numberOfComments: 2,
imageUrl: 'https://user-images.githubusercontent.com/3433606/171650424-c9fa4450-684d-4f6c-8657-d80245116a5b.png',
},
Expand All @@ -21,7 +20,6 @@ export const MOCK_NOTES = [
body: 'It is common for knowledge workers in the AEC industry to operate within information bubbles.2',
date: '2022-06-01T22:10:49Z',
username: 'TEST_ISSUE_USERNAME',
avatarUrl: 'https://avatars.githubusercontent.com/u/3433606?v=4',
numberOfComments: 2,
imageUrl: 'https://user-images.githubusercontent.com/3433606/171650424-c9fa4450-684d-4f6c-8657-d80245116a5b.png',
},
Expand Down
165 changes: 81 additions & 84 deletions src/net/github/Comments.fixture.js
Original file line number Diff line number Diff line change
@@ -1,32 +1,30 @@
const GITHUB_BASE_URL = process.env.GITHUB_BASE_URL


export const MOCK_COMMENTS = {
data: [
{
url: `${GITHUB_BASE_URL}/repos/pablo-mayrgundter/Share/issues/comments/1144935479`,
html_url: 'https://github.com/pablo-mayrgundter/Share/issues/17#issuecomment-1144935479',
issue_url: `${GITHUB_BASE_URL}/repos/pablo-mayrgundter/Share/issues/17`,
url: `${GITHUB_BASE_URL}/repos/org/repo/issues/comments/1144935479`,
html_url: 'https://github.com/org/repo/issues/17#issuecomment-1144935479',
issue_url: `${GITHUB_BASE_URL}/repos/org/repo/issues/17`,
id: 1144935480,
node_id: 'IC_kwDOFwgxOc5EPlQ3',
number: 1,
user: {
login: 'OlegMoshkovich',
id: 3433607,
node_id: 'MDQ6VXNlcjM0MzM2MDY=',
avatar_url: 'https://avatars.githubusercontent.com/u/3433606?v=4',
login: 'user1',
id: 1234567,
node_id: 'MDQ6VXNlcjEyMzQ1Njc=',
gravatar_id: '',
url: `${GITHUB_BASE_URL}/users/OlegMoshkovich`,
html_url: 'https://github.com/OlegMoshkovich',
followers_url: `${GITHUB_BASE_URL}/users/OlegMoshkovich/followers`,
following_url: `${GITHUB_BASE_URL}/users/OlegMoshkovich/following{/other_user}`,
gists_url: `${GITHUB_BASE_URL}/users/OlegMoshkovich/gists{/gist_id}`,
starred_url: `${GITHUB_BASE_URL}/users/OlegMoshkovich/starred{/owner}{/repo}`,
subscriptions_url: `${GITHUB_BASE_URL}/users/OlegMoshkovich/subscriptions`,
organizations_url: `${GITHUB_BASE_URL}/users/OlegMoshkovich/orgs`,
repos_url: `${GITHUB_BASE_URL}/users/OlegMoshkovich/repos`,
events_url: `${GITHUB_BASE_URL}/users/OlegMoshkovich/events{/privacy}`,
received_events_url: `${GITHUB_BASE_URL}/users/OlegMoshkovich/received_events`,
url: `${GITHUB_BASE_URL}/users/user1`,
html_url: 'https://github.com/user1',
followers_url: `${GITHUB_BASE_URL}/users/user1/followers`,
following_url: `${GITHUB_BASE_URL}/users/user1/following{/other_user}`,
gists_url: `${GITHUB_BASE_URL}/users/user1/gists{/gist_id}`,
starred_url: `${GITHUB_BASE_URL}/users/user1/starred{/owner}{/repo}`,
subscriptions_url: `${GITHUB_BASE_URL}/users/user1/subscriptions`,
organizations_url: `${GITHUB_BASE_URL}/users/user1/orgs`,
repos_url: `${GITHUB_BASE_URL}/users/user1/repos`,
events_url: `${GITHUB_BASE_URL}/users/user1/events{/privacy}`,
received_events_url: `${GITHUB_BASE_URL}/users/user1/received_events`,
type: 'User',
site_admin: false,
},
Expand All @@ -35,7 +33,7 @@ export const MOCK_COMMENTS = {
author_association: 'NONE',
body: `testComment_1`,
reactions: {
'url': `${GITHUB_BASE_URL}/repos/pablo-mayrgundter/Share/issues/comments/1144935479/reactions`,
'url': `${GITHUB_BASE_URL}/repos/org/repo/issues/comments/1144935479/reactions`,
'total_count': 0,
'+1': 0,
'-1': 0,
Expand All @@ -49,29 +47,28 @@ export const MOCK_COMMENTS = {
performed_via_github_app: null,
},
{
url: `${GITHUB_BASE_URL}/repos/pablo-mayrgundter/Share/issues/comments/1144935479`,
html_url: 'https://github.com/pablo-mayrgundter/Share/issues/17#issuecomment-1144935479',
issue_url: `${GITHUB_BASE_URL}/repos/pablo-mayrgundter/Share/issues/17`,
url: `${GITHUB_BASE_URL}/repos/org/repo/issues/comments/1144935481`,
html_url: 'https://github.com/org/repo/issues/17#issuecomment-1144935481',
issue_url: `${GITHUB_BASE_URL}/repos/org/repo/issues/17`,
id: 1144935481,
node_id: 'IC_kwDOFwgxOc5EPlQ4',
number: 2,
node_id: 'IC_kwDOFwgxOc5EPlQ3',
user: {
login: 'OlegMoshkovich',
id: 3433606,
node_id: 'MDQ6VXNlcjM0MzM2MDY=',
avatar_url: 'https://avatars.githubusercontent.com/u/3433606?v=4',
login: 'user2',
id: 1234568,
node_id: 'MDQ6VXNlcjEyMzQ1Njg=',
gravatar_id: '',
url: `${GITHUB_BASE_URL}/users/OlegMoshkovich`,
html_url: 'https://github.com/OlegMoshkovich',
followers_url: `${GITHUB_BASE_URL}/users/OlegMoshkovich/followers`,
following_url: `${GITHUB_BASE_URL}/users/OlegMoshkovich/following{/other_user}`,
gists_url: `${GITHUB_BASE_URL}/users/OlegMoshkovich/gists{/gist_id}`,
starred_url: `${GITHUB_BASE_URL}/users/OlegMoshkovich/starred{/owner}{/repo}`,
subscriptions_url: `${GITHUB_BASE_URL}/users/OlegMoshkovich/subscriptions`,
organizations_url: `${GITHUB_BASE_URL}/users/OlegMoshkovich/orgs`,
repos_url: `${GITHUB_BASE_URL}/users/OlegMoshkovich/repos`,
events_url: `${GITHUB_BASE_URL}/users/OlegMoshkovich/events{/privacy}`,
received_events_url: `${GITHUB_BASE_URL}/users/OlegMoshkovich/received_events`,
url: `${GITHUB_BASE_URL}/users/user2`,
html_url: 'https://github.com/user2',
followers_url: `${GITHUB_BASE_URL}/users/user2/followers`,
following_url: `${GITHUB_BASE_URL}/users/user2/following{/other_user}`,
gists_url: `${GITHUB_BASE_URL}/users/user2/gists{/gist_id}`,
starred_url: `${GITHUB_BASE_URL}/users/user2/starred{/owner}{/repo}`,
subscriptions_url: `${GITHUB_BASE_URL}/users/user2/subscriptions`,
organizations_url: `${GITHUB_BASE_URL}/users/user2/orgs`,
repos_url: `${GITHUB_BASE_URL}/users/user2/repos`,
events_url: `${GITHUB_BASE_URL}/users/user2/events{/privacy}`,
received_events_url: `${GITHUB_BASE_URL}/users/user2/received_events`,
type: 'User',
site_admin: false,
},
Expand All @@ -80,7 +77,7 @@ export const MOCK_COMMENTS = {
author_association: 'NONE',
body: `testComment_2`,
reactions: {
'url': `${GITHUB_BASE_URL}/repos/pablo-mayrgundter/Share/issues/comments/1144935479/reactions`,
'url': `${GITHUB_BASE_URL}/repos/org/repo/issues/comments/1144935481/reactions`,
'total_count': 0,
'+1': 0,
'-1': 0,
Expand All @@ -97,47 +94,47 @@ export const MOCK_COMMENTS = {
}

export const MOCK_COMMENT = {
url: `${GITHUB_BASE_URL}/repos/pablo-mayrgundter/Share/issues/comments/1144935479`,
html_url: 'https://github.com/pablo-mayrgundter/Share/issues/17#issuecomment-1144935479',
issue_url: `${GITHUB_BASE_URL}/repos/pablo-mayrgundter/Share/issues/17`,
id: 1144935480,
node_id: 'IC_kwDOFwgxOc5EPlQ3',
number: 1,
user: {
login: 'cypresstester',
id: 3433607,
node_id: 'MDQ6VXNlcjM0MzM2MDY=',
avatar_url: 'https://avatars.githubusercontent.com/u/3433606?v=4',
gravatar_id: '',
url: `${GITHUB_BASE_URL}/users/OlegMoshkovich`,
html_url: 'https://github.com/OlegMoshkovich',
followers_url: `${GITHUB_BASE_URL}/users/OlegMoshkovich/followers`,
following_url: `${GITHUB_BASE_URL}/users/OlegMoshkovich/following{/other_user}`,
gists_url: `${GITHUB_BASE_URL}/users/OlegMoshkovich/gists{/gist_id}`,
starred_url: `${GITHUB_BASE_URL}/users/OlegMoshkovich/starred{/owner}{/repo}`,
subscriptions_url: `${GITHUB_BASE_URL}/users/OlegMoshkovich/subscriptions`,
organizations_url: `${GITHUB_BASE_URL}/users/OlegMoshkovich/orgs`,
repos_url: `${GITHUB_BASE_URL}/users/OlegMoshkovich/repos`,
events_url: `${GITHUB_BASE_URL}/users/OlegMoshkovich/events{/privacy}`,
received_events_url: `${GITHUB_BASE_URL}/users/OlegMoshkovich/received_events`,
type: 'User',
site_admin: false,
},
created_at: '2022-06-02T14:31:04Z',
updated_at: '2022-06-08T08:18:43Z',
author_association: 'NONE',
body: `created_comment_body`,
reactions: {
'url': `${GITHUB_BASE_URL}/repos/pablo-mayrgundter/Share/issues/comments/1144935479/reactions`,
'total_count': 0,
'+1': 0,
'-1': 0,
'laugh': 0,
'hooray': 0,
'confused': 0,
'heart': 0,
'rocket': 0,
'eyes': 0,
},
performed_via_github_app: null,
}
url: `${GITHUB_BASE_URL}/repos/org/repo/issues/comments/1144935479`,
html_url: 'https://github.com/org/repo/issues/17#issuecomment-1144935479',
issue_url: `${GITHUB_BASE_URL}/repos/org/repo/issues/17`,
id: 1144935480,
node_id: 'IC_kwDOFwgxOc5EPlQ3',
number: 1,
user: {
login: 'user3',
id: 1234569,
node_id: 'MDQ6VXNlcjEyMzQ1Njk=',
gravatar_id: '',
url: `${GITHUB_BASE_URL}/users/user3`,
html_url: 'https://github.com/user3',
followers_url: `${GITHUB_BASE_URL}/users/user3/followers`,
following_url: `${GITHUB_BASE_URL}/users/user3/following{/other_user}`,
gists_url: `${GITHUB_BASE_URL}/users/user3/gists{/gist_id}`,
starred_url: `${GITHUB_BASE_URL}/users/user3/starred{/owner}{/repo}`,
subscriptions_url: `${GITHUB_BASE_URL}/users/user3/subscriptions`,
organizations_url: `${GITHUB_BASE_URL}/users/user3/orgs`,
repos_url: `${GITHUB_BASE_URL}/users/user3/repos`,
events_url: `${GITHUB_BASE_URL}/users/user3/events{/privacy}`,
received_events_url: `${GITHUB_BASE_URL}/users/user3/received_events`,
type: 'User',
site_admin: false,
},
created_at: '2022-06-02T14:31:04Z',
updated_at: '2022-06-08T08:18:43Z',
author_association: 'NONE',
body: `created_comment_body`,
reactions: {
'url': `${GITHUB_BASE_URL}/repos/org/repo/issues/comments/1144935479/reactions`,
'total_count': 0,
'+1': 0,
'-1': 0,
'laugh': 0,
'hooray': 0,
'confused': 0,
'heart': 0,
'rocket': 0,
'eyes': 0,
},
performed_via_github_app: null,
}

96 changes: 46 additions & 50 deletions src/net/github/Issues.fixture.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,33 +50,32 @@ export const sampleIssues = [
export const MOCK_ISSUES = {
data: [
{
url: `${GITHUB_BASE_URL}/repos/pablo-mayrgundter/Share/issues/17`,
repository_url: `${GITHUB_BASE_URL}/repos/pablo-mayrgundter/Share`,
labels_url: `${GITHUB_BASE_URL}/repos/pablo-mayrgundter/Share/issues/17/labels{/name}`,
comments_url: `${GITHUB_BASE_URL}/repos/pablo-mayrgundter/Share/issues/17/comments`,
events_url: `${GITHUB_BASE_URL}/repos/pablo-mayrgundter/Share/issues/17/events`,
html_url: 'https://github.com/pablo-mayrgundter/Share/issues/17',
url: `${GITHUB_BASE_URL}/repos/org/repo/issues/17`,
repository_url: `${GITHUB_BASE_URL}/repos/org/repo`,
labels_url: `${GITHUB_BASE_URL}/repos/org/repo/issues/17/labels{/name}`,
comments_url: `${GITHUB_BASE_URL}/repos/org/repo/issues/17/comments`,
events_url: `${GITHUB_BASE_URL}/repos/org/repo/issues/17/events`,
html_url: 'https://github.com/org/repo/issues/17',
id: 1257156364,
node_id: 'I_kwDOFwgxOc5K7q8M',
number: 1,
title: 'Local issue - some text is here to test - Id:1257156364',
user: {
login: 'OlegMoshkovich',
id: 3433606,
login: 'user',
id: 123456,
node_id: 'MDQ6VXNlcjM0MzM2MDY=',
avatar_url: 'https://avatars.githubusercontent.com/u/3433606?v=4',
gravatar_id: '',
url: `${GITHUB_BASE_URL}/users/OlegMoshkovich`,
html_url: 'https://github.com/OlegMoshkovich',
followers_url: `${GITHUB_BASE_URL}/users/OlegMoshkovich/followers`,
following_url: `${GITHUB_BASE_URL}/users/OlegMoshkovich/following{/other_user}`,
gists_url: `${GITHUB_BASE_URL}/users/OlegMoshkovich/gists{/gist_id}`,
starred_url: `${GITHUB_BASE_URL}/users/OlegMoshkovich/starred{/owner}{/repo}`,
subscriptions_url: `${GITHUB_BASE_URL}/users/OlegMoshkovich/subscriptions`,
organizations_url: `${GITHUB_BASE_URL}/users/OlegMoshkovich/orgs`,
repos_url: `${GITHUB_BASE_URL}/users/OlegMoshkovich/repos`,
events_url: `${GITHUB_BASE_URL}/users/OlegMoshkovich/events{/privacy}`,
received_events_url: `${GITHUB_BASE_URL}/users/OlegMoshkovich/received_events`,
url: `${GITHUB_BASE_URL}/users/user`,
html_url: 'https://github.com/user',
followers_url: `${GITHUB_BASE_URL}/users/user/followers`,
following_url: `${GITHUB_BASE_URL}/users/user/following{/other_user}`,
gists_url: `${GITHUB_BASE_URL}/users/user/gists{/gist_id}`,
starred_url: `${GITHUB_BASE_URL}/users/user/starred{/owner}{/repo}`,
subscriptions_url: `${GITHUB_BASE_URL}/users/user/subscriptions`,
organizations_url: `${GITHUB_BASE_URL}/users/user/orgs`,
repos_url: `${GITHUB_BASE_URL}/users/user/repos`,
events_url: `${GITHUB_BASE_URL}/users/user/events{/privacy}`,
received_events_url: `${GITHUB_BASE_URL}/users/user/received_events`,
type: 'User',
site_admin: false,
},
Expand All @@ -92,11 +91,11 @@ export const MOCK_ISSUES = {
closed_at: null,
author_association: 'NONE',
active_lock_reason: null,
body: `*BLDRS* aims to enable asynchronous workflows by integrating essential communication channels and open standard.
body: `*BLDRS* aims to enable asynchronous workflows by integrating essential communication channels and open standard.
![bldrs ecosystem](https://user-images.githubusercontent.com/3433606/171650424-c9fa4450-684d-4f6c-8657-d80245116a5b.png)
[Camera 1](http://localhost:8080/share/v/p/index.ifc#c:-29.47,18.53,111.13,-30.27,20.97,-10.06;i:1257156364)`,
reactions: {
'url': `${GITHUB_BASE_URL}/repos/pablo-mayrgundter/Share/issues/17/reactions`,
'url': `${GITHUB_BASE_URL}/repos/org/repo/issues/17/reactions`,
'total_count': 0,
'+1': 0,
'-1': 0,
Expand All @@ -107,38 +106,37 @@ export const MOCK_ISSUES = {
'rocket': 0,
'eyes': 0,
},
timeline_url: `${GITHUB_BASE_URL}/repos/pablo-mayrgundter/Share/issues/17/timeline`,
timeline_url: `${GITHUB_BASE_URL}/repos/org/repo/issues/17/timeline`,
performed_via_github_app: null,
state_reason: null,
},
{
url: `${GITHUB_BASE_URL}/repos/pablo-mayrgundter/Share/issues/17`,
repository_url: `${GITHUB_BASE_URL}/repos/pablo-mayrgundter/Share`,
labels_url: `${GITHUB_BASE_URL}/repos/pablo-mayrgundter/Share/issues/17/labels{/name}`,
comments_url: `${GITHUB_BASE_URL}/repos/pablo-mayrgundter/Share/issues/17/comments`,
events_url: `${GITHUB_BASE_URL}/repos/pablo-mayrgundter/Share/issues/17/events`,
html_url: 'https://github.com/pablo-mayrgundter/Share/issues/17',
url: `${GITHUB_BASE_URL}/repos/org/repo/issues/18`,
repository_url: `${GITHUB_BASE_URL}/repos/org/repo`,
labels_url: `${GITHUB_BASE_URL}/repos/org/repo/issues/18/labels{/name}`,
comments_url: `${GITHUB_BASE_URL}/repos/org/repo/issues/18/comments`,
events_url: `${GITHUB_BASE_URL}/repos/org/repo/issues/18/events`,
html_url: 'https://github.com/org/repo/issues/18',
id: 2,
node_id: 'I_kwDOFwgxOc5K7q8M',
node_id: 'I_kwDOFwgxOc5K7q8N',
number: 2,
title: 'Local issue 2',
user: {
login: 'OlegMoshkovich',
id: 3433606,
login: 'user',
id: 123456,
node_id: 'MDQ6VXNlcjM0MzM2MDY=',
avatar_url: 'https://avatars.githubusercontent.com/u/3433606?v=4',
gravatar_id: '',
url: `${GITHUB_BASE_URL}/users/OlegMoshkovich`,
html_url: 'https://github.com/OlegMoshkovich',
followers_url: `${GITHUB_BASE_URL}/users/OlegMoshkovich/followers`,
following_url: `${GITHUB_BASE_URL}/users/OlegMoshkovich/following{/other_user}`,
gists_url: `${GITHUB_BASE_URL}/users/OlegMoshkovich/gists{/gist_id}`,
starred_url: `${GITHUB_BASE_URL}/users/OlegMoshkovich/starred{/owner}{/repo}`,
subscriptions_url: `${GITHUB_BASE_URL}/users/OlegMoshkovich/subscriptions`,
organizations_url: `${GITHUB_BASE_URL}/users/OlegMoshkovich/orgs`,
repos_url: `${GITHUB_BASE_URL}/users/OlegMoshkovich/repos`,
events_url: `${GITHUB_BASE_URL}/users/OlegMoshkovich/events{/privacy}`,
received_events_url: `${GITHUB_BASE_URL}/users/OlegMoshkovich/received_events`,
url: `${GITHUB_BASE_URL}/users/user`,
html_url: 'https://github.com/user',
followers_url: `${GITHUB_BASE_URL}/users/user/followers`,
following_url: `${GITHUB_BASE_URL}/users/user/following{/other_user}`,
gists_url: `${GITHUB_BASE_URL}/users/user/gists{/gist_id}`,
starred_url: `${GITHUB_BASE_URL}/users/user/starred{/owner}{/repo}`,
subscriptions_url: `${GITHUB_BASE_URL}/users/user/subscriptions`,
organizations_url: `${GITHUB_BASE_URL}/users/user/orgs`,
repos_url: `${GITHUB_BASE_URL}/users/user/repos`,
events_url: `${GITHUB_BASE_URL}/users/user/events{/privacy}`,
received_events_url: `${GITHUB_BASE_URL}/users/user/received_events`,
type: 'User',
site_admin: false,
},
Expand All @@ -159,7 +157,7 @@ export const MOCK_ISSUES = {
- [cam 2](http://localhost:8080/share/v/p/index.ifc#c:-26.91,28.84,112.47,-10,16.21,-3.48;i:2)
- [cam 3](http://localhost:8080/share/v/p/index.ifc#c:-26.91,28.84,112.47,0,16.21,-3.48;i:2)`,
reactions: {
'url': `${GITHUB_BASE_URL}/repos/pablo-mayrgundter/Share/issues/17/reactions`,
'url': `${GITHUB_BASE_URL}/repos/org/repo/issues/18/reactions`,
'total_count': 0,
'+1': 0,
'-1': 0,
Expand All @@ -170,14 +168,13 @@ export const MOCK_ISSUES = {
'rocket': 0,
'eyes': 0,
},
timeline_url: `${GITHUB_BASE_URL}/repos/pablo-mayrgundter/Share/issues/17/timeline`,
timeline_url: `${GITHUB_BASE_URL}/repos/org/repo/issues/18/timeline`,
performed_via_github_app: null,
state_reason: null,
},
],
}


/**
* Generates an array of mock GitHub issue objects.
* Each issue object is constructed using the provided organization, repository, and issue information.
Expand All @@ -203,9 +200,8 @@ export const createMockIssues = (org, repo, issuesInfo) => {
login: 'cypresstester',
id: 3433606,
node_id: 'MDQ6VXNlcjM0MzM2MDY=',
avatar_url: 'https://avatars.githubusercontent.com/u/3433606?v=4',
url: 'https://api.github.com/users/OlegMoshkovich',
html_url: 'https://github.com/OlegMoshkovich',
url: `https://api.github.com/users/user`,
html_url: 'https://github.com/user',
},
labels: [],
state: 'open',
Expand Down

0 comments on commit f98bead

Please sign in to comment.