审查与合并拉取请求
您可以直接在 Backlog 中检查和审查代码差异。
首先,转到“Files”选项卡。
![Go to the “Files” tab](/static/25348215e5549359fd8824eedc940947/5a190/01.png)
如果您发现需要修改的内容,您可以直接在源代码上进行评论。
只需将鼠标悬停在目标行上,然后单击出现的加号按钮。
![Hover over the target row and click the plus button that appears](/static/1163e17013c9b05e305c35ba0c99f8f9/5a190/02.png)
输入任何更改以及您要通知的用户。然后点击“Submit”。
![click “Submit”](/static/e7d53deac23736017fb694b641392fde/5a190/03.png)
您的评论会嵌入到源代码中,并发布到“Comment”选项卡。
![Also posted to the “Comment” tab](/static/7c94dfc9641d1369a375b07f3d9c028d/5a190/04.png)
在审查了我们之前添加的拉取请求的评论后,并相应地修改源代码。
var sortNumber = function (number) {
number.sort(function (a, b) {
if (a === b) {
return 0;
}
return a < b ? -1 : 1;
});
};
var number = [19, 3, 81, 1, 24, 21];
sortNumber(number);
console.log(number);
现在修正完成,再次提交并推送。
$ git add sort.js
$ git commit -m "<commit_message>"
$ git push origin add-sort-func
“Fix to use the strict equality operator (===)”
在我们之前创建的拉取请求上发表评论,表明该拉取请求已被修复。