-
Notifications
You must be signed in to change notification settings - Fork 0
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
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this 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.
contracts/SadaivBackup.sol
Outdated
} | ||
|
||
mapping(uint256 => Repository) public userRepos; //repoId => repo | ||
mapping(uint256 => mapping(string => Build)) public repoBuilds; //repoId => commitHash => build |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
There was a problem hiding this 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
contracts/SadaivId.sol
Outdated
uint256 _sadaivId = SCWAddressToSadaivId[signer]; | ||
contributorData[_sadaivId] = cid; |
There was a problem hiding this comment.
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.
…into new-features
No description provided.