Skip to content

New contracts and tests#4

Open
aditipolkam wants to merge 19 commits intomasterfrom
new-features
Open

New contracts and tests#4
aditipolkam wants to merge 19 commits intomasterfrom
new-features

Conversation

@aditipolkam
Copy link
Copy Markdown
Collaborator

No description provided.

Copy link
Copy Markdown
Member

@tusharojha tusharojha left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please check the added comments.

}

mapping(uint256 => Repository) public userRepos; //repoId => repo
mapping(uint256 => mapping(string => Build)) public repoBuilds; //repoId => commitHash => build
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

RepoId -> commitHash -> build

is good but multiple branches can commit with same hash.

Repo

Commit Hash: 3x323
Branch A

now I use git pick this commit to new branch B and push
that will become

Commit Hash: 3x323
Branch B

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

so what do you suggest can be the identifier for the commit?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it should be simply: repoid -> branch -> commitHash -> build

I know this is quite nested.

or maybe something like you hash branch + commitHash and use it as id.

Copy link
Copy Markdown
Member

@tusharojha tusharojha left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just one last change

Comment on lines +93 to +94
uint256 _sadaivId = SCWAddressToSadaivId[signer];
contributorData[_sadaivId] = cid;
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Handle check if the profile doesn't exist?

If some random address try to update, _sadaivId would be zero. so pls add this check and write test for it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants