658 log.info(`Updating issue for work item (${workItem.id})...`);
659 const octokit = new github.getOctokit(config.github.token);
660 const owner = config.GITHUB_REPOSITORY_OWNER;
661 const repo = config.GITHUB_REPOSITORY.replace(owner + "/", "");662 const converter = new showdown.Converter();
663
664 log.debug(`[WORKITEM: ${workItem.id}] Owner:`, owner);
625 let context = { project: config.ado.project };
626 let wiql = {
627 query:
628 "SELECT [System.Id], [System.Description], [System.Title], [System.AssignedTo], [System.State], [System.Tags] FROM workitems WHERE [System.TeamProject] = @project " +629 "AND [System.WorkItemType] = '" + config.ado.wit + "'" +630 "AND [System.Tags] CONTAINS 'GitHub Issue' " +631 "AND [System.Tags] CONTAINS 'GitHub Repo: " + config.GITHUB_REPOSITORY + "' " +632 "AND [System.ChangedDate] > @Today - 1"633 };
634
635 log.debug("WIQL Query:", wiql);
201 let context = { project: config.ado.project };
202 let wiql = {
203 query:
204 "SELECT [System.Id], [System.Description], [System.Title], [System.AssignedTo], [System.State], [System.Tags] FROM workitems WHERE [System.TeamProject] = @project " +205 "AND [System.WorkItemType] = '" + config.ado.wit + "'" +206 "AND [System.Title] CONTAINS 'GH #" + config.issue.number + ":' " +207 "AND [System.Tags] CONTAINS 'GitHub Issue' " +208 "AND [System.Tags] CONTAINS 'GitHub Repo: " + config.repository.full_name + "'"209 };
210
211 log.debug("WIQL Query:", wiql);
In ES2015 (ES6), we can use template literals instead of string concatenation.
var str = `Hello, ${name}!`;
var str = "Hello, " + name + "!";
var str = "Time: " + (12 * 60 * 60 * 1000);
var str = "Hello World!";
var str = `Hello, ${name}!`;
var str = `Time: ${12 * 60 * 60 * 1000}`;
var str = "Hello, " + "World!";