Skip to content
代码片段 群组 项目
未验证 提交 111addc8 编辑于 作者: Joe Woodward's avatar Joe Woodward 提交者: GitLab
浏览文件

Update file locking QA feature spec

We recently introduced a new merge request check that looks for locked
files.

The check ensures that none of the paths are locked by anyone other than
the author.

It looks like we forgot to update the spec. The spec didn't fail because
the author was also locking the file so we weren't tripping this check.

We also introduced a new merge commit diff mode which interacts with
this check. The diff mode will ignore changes from merge commits that
are present in all parents i.e.

If the merge request author merged the target_branch into the
source_branch after making changes in the source_branch:

Previously, we would include all of those files as changed_paths even if
the merge request author hadn't modifed them through fixing merge
conflicts or manually amending the commit.

Now, we only include the merged changes in the changed_paths if the user
fixed a merge conflict or manually amended the file.

So what was previously happening was the check during the MR phase would
return zero locked paths but then when you merge and gitlab pushes the
changes to the repository we would run the same checks on the merge
commit and that would be flagged because it's no longer the merge
request author but the person who merged the MR.

When we enable the new merge commit diff mode this change isn't
evaluated after being merged so we do not receive any error and the test
fails.

I've updated the test to now check that the path lock check has failed.
上级 b1f32804
No related branches found
No related tags found
无相关合并请求
加载中
0% 加载中 .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册