1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
import { transitionIssue } from "https://esm.town/v/linbuxiao/transitionIssue";
import { fetchAllUnresolvedJiraIssues } from "https://esm.town/v/linbuxiao/fetchAllUnresolvedJiraIssues";
export const resolveAllTransitions = async (
token: string,
name: string,
issueKey: string,
) => {
const issues = await fetchAllUnresolvedJiraIssues(
token,
name,
);
issues.forEach(async (item) => {
await transitionIssue(token, item.key, issueKey);
});
return {
successIssues: issues.map((item) => item.key),
};
};