Skip to content
代码片段 群组 项目
未验证 提交 11dfca97 编辑于 作者: Rémy Coutable's avatar Rémy Coutable
浏览文件

Fix keeps/quarantine_flaky_tests.rb after latest refactor


Signed-off-by: default avatarRémy Coutable <remy@rymai.me>
上级 5d71de0e
No related branches found
No related tags found
无相关合并请求
...@@ -48,12 +48,11 @@ def prepare_change(flaky_issue) ...@@ -48,12 +48,11 @@ def prepare_change(flaky_issue)
file = File.expand_path("../#{filename}", __dir__) file = File.expand_path("../#{filename}", __dir__)
full_file_content = File.read(file) full_file_content = File.read(file)
issue_url = flaky_issue['web_url']
file_lines = full_file_content.lines file_lines = full_file_content.lines
return unless file_lines[line_number - 1].match?(EXAMPLE_LINE_REGEX) return unless file_lines[line_number - 1].match?(EXAMPLE_LINE_REGEX)
file_lines[line_number - 1].sub!(EXAMPLE_LINE_REGEX, "\\1, quarantine: '#{issue_url}' do") file_lines[line_number - 1].sub!(EXAMPLE_LINE_REGEX, "\\1, quarantine: '#{flaky_issue['web_url']}' do")
File.write(file, file_lines.join) File.write(file, file_lines.join)
construct_change(filename, line_number, description, flaky_issue) construct_change(filename, line_number, description, flaky_issue)
...@@ -91,7 +90,7 @@ def construct_change(filename, line_number, description, flaky_issue) ...@@ -91,7 +90,7 @@ def construct_change(filename, line_number, description, flaky_issue)
- accept the merge request and schedule to improve the test - accept the merge request and schedule to improve the test
- close the merge request in favor of another merge request to delete the test - close the merge request in favor of another merge request to delete the test
Related to #{issue_url}. Related to #{flaky_issue['web_url']}.
MARKDOWN MARKDOWN
group_label = flaky_issue['labels'].grep(/group::/).first group_label = flaky_issue['labels'].grep(/group::/).first
......
0% 加载中 .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册