Skip to content

Instantly share code, notes, and snippets.

@ninedraft
Created February 14, 2020 11:07
Show Gist options
  • Save ninedraft/e2955984f8cfbfb4128cccebef9d0b7c to your computer and use it in GitHub Desktop.
Save ninedraft/e2955984f8cfbfb4128cccebef9d0b7c to your computer and use it in GitHub Desktop.
Export list of merge requests from gitlab to text
var query = "//*[contains(concat(' ', normalize-space(@class),' '), 'merge-request-title-text ')]/a";
var formatter = function(elem, i) {
return "review " + elem.innerText + ". Link: " + elem.href
}
var tasks = $x(query)
.map(formatter)
.join('\n');
console.log(tasks);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment