Skip to content

Instantly share code, notes, and snippets.

@hiiamyes
Last active April 26, 2019 10:04
Show Gist options
  • Save hiiamyes/9f1e0bfdf6b091546d41a15e8fc32a00 to your computer and use it in GitHub Desktop.
Save hiiamyes/9f1e0bfdf6b091546d41a15e8fc32a00 to your computer and use it in GitHub Desktop.
jira-daily-standup.js
const axios = require("axios");
(async () => {
const assignee = "yes",
username = "",
password = "";
const res = await axios.request({
url: "https://emq-inc.atlassian.net/rest/api/3/search",
method: "post",
auth: {
username,
password
},
data: {
expand: [],
jql: `
project = CORE AND updatedDate > startOfDay() AND assignee changed from ${assignee} AFTER startOfDay() OR
project = CORE AND updatedDate > startOfDay() AND status in ("In Progress", "In Review", Test, Done) AND assignee = ${assignee} ORDER BY status ASC
`,
maxResults: 100,
fields: ["summary", "status"]
}
});
dailyStanup = "";
let status = "";
res.data.issues.forEach(
({
key,
fields: {
summary,
status: { name: statusName }
}
}) => {
if (status !== statusName) {
status = statusName;
dailyStanup += `\n${statusName}:\n`;
}
dailyStanup += `${key} ${summary}\n`;
}
);
const proc = require("child_process").spawn("pbcopy");
proc.stdin.write(dailyStanup);
proc.stdin.end();
console.log(dailyStanup);
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment