修改评论
This commit is contained in:
parent
250c19d1f0
commit
1e3552bd0c
|
|
@ -49,7 +49,6 @@ export const Commenting = (props) => {
|
|||
const submit = usePersistFn(async (note, type) => {
|
||||
try {
|
||||
console.log(note,type);
|
||||
debugger;
|
||||
await addComment({
|
||||
note,
|
||||
diffId: toVersion.id,
|
||||
|
|
|
|||
|
|
@ -96,6 +96,7 @@ export const prService = {
|
|||
item.author.username=item.user.name;
|
||||
item.type='Common';
|
||||
item.stDiff=item.diff;
|
||||
// item.lineType='old';
|
||||
}
|
||||
return journals;
|
||||
},
|
||||
|
|
@ -161,7 +162,14 @@ export const prService = {
|
|||
|
||||
async addComment(projectsId, owner, mergeId, data) {
|
||||
const res = await axios.post(`/v1/${owner}/${projectsId}/pulls/${mergeId}/journals.json`, data);
|
||||
return res.data;
|
||||
console.log('addComment===');
|
||||
let commentData=underscoreToCamelcase(res.data);
|
||||
commentData.author=commentData.user;
|
||||
commentData.author.avatarUrl=commentData.user.imageUrl?getImageUrl(commentData.user.imageUrl):'';
|
||||
commentData.author.username=commentData.user.name;
|
||||
commentData.type='Common';
|
||||
commentData.stDiff=commentData.diff;
|
||||
return commentData;
|
||||
},
|
||||
|
||||
async createReview(projectsId, owner, mergeId, data) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue