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

New contracts and tests #4

Open
wants to merge 19 commits into
base: master
Choose a base branch
from
Open

New contracts and tests #4

wants to merge 19 commits into from

Conversation

aditipolkam
Copy link
Collaborator

No description provided.

Copy link
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
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
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
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.

contracts/SadaivId.sol Show resolved Hide resolved
Copy link
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
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