Skip to content

Commit

Permalink
add project URL, if present
Browse files Browse the repository at this point in the history
  • Loading branch information
BrianHicks committed Sep 9, 2022
1 parent df7921a commit a6d4415
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion Linear.omnifocusjs/Resources/pull.js
Expand Up @@ -28,7 +28,7 @@
// Step 2: get the tasks //
///////////////////////////
req.method = "POST";
req.bodyString = '{"query":"{ viewer { assignedIssues(filter: {state: {type: {nin: [\\"completed\\",\\"canceled\\"]}}}) { nodes { identifier title url team { name } project { name } } } } }"}';
req.bodyString = '{"query":"{ viewer { assignedIssues(filter: {state: {type: {nin: [\\"completed\\",\\"canceled\\"]}}}) { nodes { identifier title url team { name } project { name url } } } } }"}';
req.headers = {
"Content-Type": "application/json",
"Authorization": key,
Expand Down Expand Up @@ -63,6 +63,13 @@
project.addTag(linearTag);
project.containsSingletonActions = true;
toFocus.push(project);
if (linearTask.project && project.note.indexOf(linearTask.project.url) === -1) {
if (project.note !== "") {
project.appendStringToNote(`\n\n${linearTask.project.url}`);
} else {
project.appendStringToNote(linearTask.project.url)
}
}

let taskName = `${linearTask.identifier}: ${linearTask.title}`;
let task = project.taskNamed(taskName) || new Task(taskName, project);
Expand Down

0 comments on commit a6d4415

Please sign in to comment.