@chief-clancy/core 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +50 -0
- package/dist/board/azdo/api/api.d.ts +95 -0
- package/dist/board/azdo/api/api.d.ts.map +1 -0
- package/dist/board/azdo/api/api.js +173 -0
- package/dist/board/azdo/api/api.js.map +1 -0
- package/dist/board/azdo/api/helpers.d.ts +89 -0
- package/dist/board/azdo/api/helpers.d.ts.map +1 -0
- package/dist/board/azdo/api/helpers.js +133 -0
- package/dist/board/azdo/api/helpers.js.map +1 -0
- package/dist/board/azdo/api/index.d.ts +5 -0
- package/dist/board/azdo/api/index.d.ts.map +1 -0
- package/dist/board/azdo/api/index.js +3 -0
- package/dist/board/azdo/api/index.js.map +1 -0
- package/dist/board/azdo/azdo-board.d.ts +12 -0
- package/dist/board/azdo/azdo-board.d.ts.map +1 -0
- package/dist/board/azdo/azdo-board.js +104 -0
- package/dist/board/azdo/azdo-board.js.map +1 -0
- package/dist/board/azdo/index.d.ts +3 -0
- package/dist/board/azdo/index.d.ts.map +1 -0
- package/dist/board/azdo/index.js +3 -0
- package/dist/board/azdo/index.js.map +1 -0
- package/dist/board/azdo/labels/index.d.ts +2 -0
- package/dist/board/azdo/labels/index.d.ts.map +1 -0
- package/dist/board/azdo/labels/index.js +2 -0
- package/dist/board/azdo/labels/index.js.map +1 -0
- package/dist/board/azdo/labels/labels.d.ts +27 -0
- package/dist/board/azdo/labels/labels.d.ts.map +1 -0
- package/dist/board/azdo/labels/labels.js +64 -0
- package/dist/board/azdo/labels/labels.js.map +1 -0
- package/dist/board/azdo/relations/index.d.ts +2 -0
- package/dist/board/azdo/relations/index.d.ts.map +1 -0
- package/dist/board/azdo/relations/index.js +2 -0
- package/dist/board/azdo/relations/index.js.map +1 -0
- package/dist/board/azdo/relations/relations.d.ts +37 -0
- package/dist/board/azdo/relations/relations.d.ts.map +1 -0
- package/dist/board/azdo/relations/relations.js +109 -0
- package/dist/board/azdo/relations/relations.js.map +1 -0
- package/dist/board/detect-board.d.ts +28 -0
- package/dist/board/detect-board.d.ts.map +1 -0
- package/dist/board/detect-board.js +80 -0
- package/dist/board/detect-board.js.map +1 -0
- package/dist/board/factory/factory.d.ts +18 -0
- package/dist/board/factory/factory.d.ts.map +1 -0
- package/dist/board/factory/factory.js +34 -0
- package/dist/board/factory/factory.js.map +1 -0
- package/dist/board/factory/index.d.ts +2 -0
- package/dist/board/factory/index.d.ts.map +1 -0
- package/dist/board/factory/index.js +2 -0
- package/dist/board/factory/index.js.map +1 -0
- package/dist/board/github/api/api.d.ts +86 -0
- package/dist/board/github/api/api.d.ts.map +1 -0
- package/dist/board/github/api/api.js +161 -0
- package/dist/board/github/api/api.js.map +1 -0
- package/dist/board/github/api/index.d.ts +3 -0
- package/dist/board/github/api/index.d.ts.map +1 -0
- package/dist/board/github/api/index.js +2 -0
- package/dist/board/github/api/index.js.map +1 -0
- package/dist/board/github/github-board.d.ts +19 -0
- package/dist/board/github/github-board.d.ts.map +1 -0
- package/dist/board/github/github-board.js +104 -0
- package/dist/board/github/github-board.js.map +1 -0
- package/dist/board/github/index.d.ts +3 -0
- package/dist/board/github/index.d.ts.map +1 -0
- package/dist/board/github/index.js +3 -0
- package/dist/board/github/index.js.map +1 -0
- package/dist/board/github/labels/index.d.ts +2 -0
- package/dist/board/github/labels/index.d.ts.map +1 -0
- package/dist/board/github/labels/index.js +2 -0
- package/dist/board/github/labels/index.js.map +1 -0
- package/dist/board/github/labels/labels.d.ts +42 -0
- package/dist/board/github/labels/labels.d.ts.map +1 -0
- package/dist/board/github/labels/labels.js +93 -0
- package/dist/board/github/labels/labels.js.map +1 -0
- package/dist/board/github/relations/index.d.ts +2 -0
- package/dist/board/github/relations/index.d.ts.map +1 -0
- package/dist/board/github/relations/index.js +2 -0
- package/dist/board/github/relations/index.js.map +1 -0
- package/dist/board/github/relations/relations.d.ts +54 -0
- package/dist/board/github/relations/relations.d.ts.map +1 -0
- package/dist/board/github/relations/relations.js +152 -0
- package/dist/board/github/relations/relations.js.map +1 -0
- package/dist/board/index.d.ts +2 -0
- package/dist/board/index.d.ts.map +1 -0
- package/dist/board/index.js +2 -0
- package/dist/board/index.js.map +1 -0
- package/dist/board/jira/api/api.d.ts +129 -0
- package/dist/board/jira/api/api.d.ts.map +1 -0
- package/dist/board/jira/api/api.js +207 -0
- package/dist/board/jira/api/api.js.map +1 -0
- package/dist/board/jira/api/index.d.ts +3 -0
- package/dist/board/jira/api/index.d.ts.map +1 -0
- package/dist/board/jira/api/index.js +2 -0
- package/dist/board/jira/api/index.js.map +1 -0
- package/dist/board/jira/index.d.ts +3 -0
- package/dist/board/jira/index.d.ts.map +1 -0
- package/dist/board/jira/index.js +3 -0
- package/dist/board/jira/index.js.map +1 -0
- package/dist/board/jira/jira-board.d.ts +12 -0
- package/dist/board/jira/jira-board.d.ts.map +1 -0
- package/dist/board/jira/jira-board.js +112 -0
- package/dist/board/jira/jira-board.js.map +1 -0
- package/dist/board/jira/labels/index.d.ts +2 -0
- package/dist/board/jira/labels/index.d.ts.map +1 -0
- package/dist/board/jira/labels/index.js +2 -0
- package/dist/board/jira/labels/index.js.map +1 -0
- package/dist/board/jira/labels/labels.d.ts +34 -0
- package/dist/board/jira/labels/labels.d.ts.map +1 -0
- package/dist/board/jira/labels/labels.js +69 -0
- package/dist/board/jira/labels/labels.js.map +1 -0
- package/dist/board/jira/relations/index.d.ts +2 -0
- package/dist/board/jira/relations/index.d.ts.map +1 -0
- package/dist/board/jira/relations/index.js +2 -0
- package/dist/board/jira/relations/index.js.map +1 -0
- package/dist/board/jira/relations/relations.d.ts +44 -0
- package/dist/board/jira/relations/relations.d.ts.map +1 -0
- package/dist/board/jira/relations/relations.js +111 -0
- package/dist/board/jira/relations/relations.js.map +1 -0
- package/dist/board/linear/api/api.d.ts +68 -0
- package/dist/board/linear/api/api.d.ts.map +1 -0
- package/dist/board/linear/api/api.js +179 -0
- package/dist/board/linear/api/api.js.map +1 -0
- package/dist/board/linear/api/index.d.ts +2 -0
- package/dist/board/linear/api/index.d.ts.map +1 -0
- package/dist/board/linear/api/index.js +2 -0
- package/dist/board/linear/api/index.js.map +1 -0
- package/dist/board/linear/index.d.ts +3 -0
- package/dist/board/linear/index.d.ts.map +1 -0
- package/dist/board/linear/index.js +3 -0
- package/dist/board/linear/index.js.map +1 -0
- package/dist/board/linear/labels/index.d.ts +2 -0
- package/dist/board/linear/labels/index.d.ts.map +1 -0
- package/dist/board/linear/labels/index.js +2 -0
- package/dist/board/linear/labels/index.js.map +1 -0
- package/dist/board/linear/labels/labels.d.ts +63 -0
- package/dist/board/linear/labels/labels.d.ts.map +1 -0
- package/dist/board/linear/labels/labels.js +204 -0
- package/dist/board/linear/labels/labels.js.map +1 -0
- package/dist/board/linear/linear-board.d.ts +18 -0
- package/dist/board/linear/linear-board.d.ts.map +1 -0
- package/dist/board/linear/linear-board.js +115 -0
- package/dist/board/linear/linear-board.js.map +1 -0
- package/dist/board/linear/relations/index.d.ts +2 -0
- package/dist/board/linear/relations/index.d.ts.map +1 -0
- package/dist/board/linear/relations/index.js +2 -0
- package/dist/board/linear/relations/index.js.map +1 -0
- package/dist/board/linear/relations/relations.d.ts +67 -0
- package/dist/board/linear/relations/relations.d.ts.map +1 -0
- package/dist/board/linear/relations/relations.js +195 -0
- package/dist/board/linear/relations/relations.js.map +1 -0
- package/dist/board/notion/api/api.d.ts +83 -0
- package/dist/board/notion/api/api.d.ts.map +1 -0
- package/dist/board/notion/api/api.js +124 -0
- package/dist/board/notion/api/api.js.map +1 -0
- package/dist/board/notion/api/helpers.d.ts +105 -0
- package/dist/board/notion/api/helpers.d.ts.map +1 -0
- package/dist/board/notion/api/helpers.js +175 -0
- package/dist/board/notion/api/helpers.js.map +1 -0
- package/dist/board/notion/api/index.d.ts +4 -0
- package/dist/board/notion/api/index.d.ts.map +1 -0
- package/dist/board/notion/api/index.js +3 -0
- package/dist/board/notion/api/index.js.map +1 -0
- package/dist/board/notion/index.d.ts +3 -0
- package/dist/board/notion/index.d.ts.map +1 -0
- package/dist/board/notion/index.js +3 -0
- package/dist/board/notion/index.js.map +1 -0
- package/dist/board/notion/labels/index.d.ts +2 -0
- package/dist/board/notion/labels/index.d.ts.map +1 -0
- package/dist/board/notion/labels/index.js +2 -0
- package/dist/board/notion/labels/index.js.map +1 -0
- package/dist/board/notion/labels/labels.d.ts +30 -0
- package/dist/board/notion/labels/labels.d.ts.map +1 -0
- package/dist/board/notion/labels/labels.js +56 -0
- package/dist/board/notion/labels/labels.js.map +1 -0
- package/dist/board/notion/notion-board.d.ts +12 -0
- package/dist/board/notion/notion-board.d.ts.map +1 -0
- package/dist/board/notion/notion-board.js +156 -0
- package/dist/board/notion/notion-board.js.map +1 -0
- package/dist/board/notion/relations/index.d.ts +2 -0
- package/dist/board/notion/relations/index.d.ts.map +1 -0
- package/dist/board/notion/relations/index.js +2 -0
- package/dist/board/notion/relations/index.js.map +1 -0
- package/dist/board/notion/relations/relations.d.ts +43 -0
- package/dist/board/notion/relations/relations.d.ts.map +1 -0
- package/dist/board/notion/relations/relations.js +127 -0
- package/dist/board/notion/relations/relations.js.map +1 -0
- package/dist/board/shortcut/api/api.d.ts +110 -0
- package/dist/board/shortcut/api/api.d.ts.map +1 -0
- package/dist/board/shortcut/api/api.js +227 -0
- package/dist/board/shortcut/api/api.js.map +1 -0
- package/dist/board/shortcut/api/index.d.ts +2 -0
- package/dist/board/shortcut/api/index.d.ts.map +1 -0
- package/dist/board/shortcut/api/index.js +2 -0
- package/dist/board/shortcut/api/index.js.map +1 -0
- package/dist/board/shortcut/index.d.ts +3 -0
- package/dist/board/shortcut/index.d.ts.map +1 -0
- package/dist/board/shortcut/index.js +3 -0
- package/dist/board/shortcut/index.js.map +1 -0
- package/dist/board/shortcut/labels/index.d.ts +2 -0
- package/dist/board/shortcut/labels/index.d.ts.map +1 -0
- package/dist/board/shortcut/labels/index.js +2 -0
- package/dist/board/shortcut/labels/index.js.map +1 -0
- package/dist/board/shortcut/labels/labels.d.ts +95 -0
- package/dist/board/shortcut/labels/labels.d.ts.map +1 -0
- package/dist/board/shortcut/labels/labels.js +154 -0
- package/dist/board/shortcut/labels/labels.js.map +1 -0
- package/dist/board/shortcut/relations/index.d.ts +2 -0
- package/dist/board/shortcut/relations/index.d.ts.map +1 -0
- package/dist/board/shortcut/relations/index.js +2 -0
- package/dist/board/shortcut/relations/index.js.map +1 -0
- package/dist/board/shortcut/relations/relations.d.ts +44 -0
- package/dist/board/shortcut/relations/relations.d.ts.map +1 -0
- package/dist/board/shortcut/relations/relations.js +118 -0
- package/dist/board/shortcut/relations/relations.js.map +1 -0
- package/dist/board/shortcut/shortcut-board.d.ts +18 -0
- package/dist/board/shortcut/shortcut-board.d.ts.map +1 -0
- package/dist/board/shortcut/shortcut-board.js +143 -0
- package/dist/board/shortcut/shortcut-board.js.map +1 -0
- package/dist/dev/lifecycle/branch/branch.d.ts +35 -0
- package/dist/dev/lifecycle/branch/branch.d.ts.map +1 -0
- package/dist/dev/lifecycle/branch/branch.js +48 -0
- package/dist/dev/lifecycle/branch/branch.js.map +1 -0
- package/dist/dev/lifecycle/branch/index.d.ts +2 -0
- package/dist/dev/lifecycle/branch/index.d.ts.map +1 -0
- package/dist/dev/lifecycle/branch/index.js +2 -0
- package/dist/dev/lifecycle/branch/index.js.map +1 -0
- package/dist/dev/lifecycle/commit-type/commit-type.d.ts +22 -0
- package/dist/dev/lifecycle/commit-type/commit-type.d.ts.map +1 -0
- package/dist/dev/lifecycle/commit-type/commit-type.js +50 -0
- package/dist/dev/lifecycle/commit-type/commit-type.js.map +1 -0
- package/dist/dev/lifecycle/commit-type/index.d.ts +2 -0
- package/dist/dev/lifecycle/commit-type/index.d.ts.map +1 -0
- package/dist/dev/lifecycle/commit-type/index.js +2 -0
- package/dist/dev/lifecycle/commit-type/index.js.map +1 -0
- package/dist/dev/lifecycle/cost/cost.d.ts +28 -0
- package/dist/dev/lifecycle/cost/cost.d.ts.map +1 -0
- package/dist/dev/lifecycle/cost/cost.js +36 -0
- package/dist/dev/lifecycle/cost/cost.js.map +1 -0
- package/dist/dev/lifecycle/deliver-epic/deliver-epic.d.ts +44 -0
- package/dist/dev/lifecycle/deliver-epic/deliver-epic.d.ts.map +1 -0
- package/dist/dev/lifecycle/deliver-epic/deliver-epic.js +75 -0
- package/dist/dev/lifecycle/deliver-epic/deliver-epic.js.map +1 -0
- package/dist/dev/lifecycle/deliver-ticket/deliver-ticket.d.ts +51 -0
- package/dist/dev/lifecycle/deliver-ticket/deliver-ticket.d.ts.map +1 -0
- package/dist/dev/lifecycle/deliver-ticket/deliver-ticket.js +132 -0
- package/dist/dev/lifecycle/deliver-ticket/deliver-ticket.js.map +1 -0
- package/dist/dev/lifecycle/epic/epic.d.ts +66 -0
- package/dist/dev/lifecycle/epic/epic.d.ts.map +1 -0
- package/dist/dev/lifecycle/epic/epic.js +91 -0
- package/dist/dev/lifecycle/epic/epic.js.map +1 -0
- package/dist/dev/lifecycle/epic/index.d.ts +2 -0
- package/dist/dev/lifecycle/epic/index.d.ts.map +1 -0
- package/dist/dev/lifecycle/epic/index.js +2 -0
- package/dist/dev/lifecycle/epic/index.js.map +1 -0
- package/dist/dev/lifecycle/feasibility/feasibility.d.ts +55 -0
- package/dist/dev/lifecycle/feasibility/feasibility.d.ts.map +1 -0
- package/dist/dev/lifecycle/feasibility/feasibility.js +75 -0
- package/dist/dev/lifecycle/feasibility/feasibility.js.map +1 -0
- package/dist/dev/lifecycle/fetch-ticket/fetch-ticket.d.ts +49 -0
- package/dist/dev/lifecycle/fetch-ticket/fetch-ticket.d.ts.map +1 -0
- package/dist/dev/lifecycle/fetch-ticket/fetch-ticket.js +81 -0
- package/dist/dev/lifecycle/fetch-ticket/fetch-ticket.js.map +1 -0
- package/dist/dev/lifecycle/format/format.d.ts +11 -0
- package/dist/dev/lifecycle/format/format.d.ts.map +1 -0
- package/dist/dev/lifecycle/format/format.js +23 -0
- package/dist/dev/lifecycle/format/format.js.map +1 -0
- package/dist/dev/lifecycle/lock/index.d.ts +3 -0
- package/dist/dev/lifecycle/lock/index.d.ts.map +1 -0
- package/dist/dev/lifecycle/lock/index.js +2 -0
- package/dist/dev/lifecycle/lock/index.js.map +1 -0
- package/dist/dev/lifecycle/lock/lock.d.ts +68 -0
- package/dist/dev/lifecycle/lock/lock.d.ts.map +1 -0
- package/dist/dev/lifecycle/lock/lock.js +125 -0
- package/dist/dev/lifecycle/lock/lock.js.map +1 -0
- package/dist/dev/lifecycle/outcome/index.d.ts +2 -0
- package/dist/dev/lifecycle/outcome/index.d.ts.map +1 -0
- package/dist/dev/lifecycle/outcome/index.js +2 -0
- package/dist/dev/lifecycle/outcome/index.js.map +1 -0
- package/dist/dev/lifecycle/outcome/outcome.d.ts +65 -0
- package/dist/dev/lifecycle/outcome/outcome.d.ts.map +1 -0
- package/dist/dev/lifecycle/outcome/outcome.js +61 -0
- package/dist/dev/lifecycle/outcome/outcome.js.map +1 -0
- package/dist/dev/lifecycle/pr-creation/index.d.ts +3 -0
- package/dist/dev/lifecycle/pr-creation/index.d.ts.map +1 -0
- package/dist/dev/lifecycle/pr-creation/index.js +2 -0
- package/dist/dev/lifecycle/pr-creation/index.js.map +1 -0
- package/dist/dev/lifecycle/pr-creation/pr-creation.d.ts +47 -0
- package/dist/dev/lifecycle/pr-creation/pr-creation.d.ts.map +1 -0
- package/dist/dev/lifecycle/pr-creation/pr-creation.js +143 -0
- package/dist/dev/lifecycle/pr-creation/pr-creation.js.map +1 -0
- package/dist/dev/lifecycle/preflight/preflight.d.ts +42 -0
- package/dist/dev/lifecycle/preflight/preflight.d.ts.map +1 -0
- package/dist/dev/lifecycle/preflight/preflight.js +101 -0
- package/dist/dev/lifecycle/preflight/preflight.js.map +1 -0
- package/dist/dev/lifecycle/progress/index.d.ts +3 -0
- package/dist/dev/lifecycle/progress/index.d.ts.map +1 -0
- package/dist/dev/lifecycle/progress/index.js +2 -0
- package/dist/dev/lifecycle/progress/index.js.map +1 -0
- package/dist/dev/lifecycle/progress/progress.d.ts +98 -0
- package/dist/dev/lifecycle/progress/progress.d.ts.map +1 -0
- package/dist/dev/lifecycle/progress/progress.js +212 -0
- package/dist/dev/lifecycle/progress/progress.js.map +1 -0
- package/dist/dev/lifecycle/pull-request/azdo/azdo.d.ts +86 -0
- package/dist/dev/lifecycle/pull-request/azdo/azdo.d.ts.map +1 -0
- package/dist/dev/lifecycle/pull-request/azdo/azdo.js +198 -0
- package/dist/dev/lifecycle/pull-request/azdo/azdo.js.map +1 -0
- package/dist/dev/lifecycle/pull-request/azdo/index.d.ts +2 -0
- package/dist/dev/lifecycle/pull-request/azdo/index.d.ts.map +1 -0
- package/dist/dev/lifecycle/pull-request/azdo/index.js +2 -0
- package/dist/dev/lifecycle/pull-request/azdo/index.js.map +1 -0
- package/dist/dev/lifecycle/pull-request/bitbucket/cloud.d.ts +85 -0
- package/dist/dev/lifecycle/pull-request/bitbucket/cloud.d.ts.map +1 -0
- package/dist/dev/lifecycle/pull-request/bitbucket/cloud.js +158 -0
- package/dist/dev/lifecycle/pull-request/bitbucket/cloud.js.map +1 -0
- package/dist/dev/lifecycle/pull-request/bitbucket/index.d.ts +3 -0
- package/dist/dev/lifecycle/pull-request/bitbucket/index.d.ts.map +1 -0
- package/dist/dev/lifecycle/pull-request/bitbucket/index.js +3 -0
- package/dist/dev/lifecycle/pull-request/bitbucket/index.js.map +1 -0
- package/dist/dev/lifecycle/pull-request/bitbucket/server.d.ts +85 -0
- package/dist/dev/lifecycle/pull-request/bitbucket/server.d.ts.map +1 -0
- package/dist/dev/lifecycle/pull-request/bitbucket/server.js +168 -0
- package/dist/dev/lifecycle/pull-request/bitbucket/server.js.map +1 -0
- package/dist/dev/lifecycle/pull-request/github/github.d.ts +107 -0
- package/dist/dev/lifecycle/pull-request/github/github.d.ts.map +1 -0
- package/dist/dev/lifecycle/pull-request/github/github.js +225 -0
- package/dist/dev/lifecycle/pull-request/github/github.js.map +1 -0
- package/dist/dev/lifecycle/pull-request/github/index.d.ts +2 -0
- package/dist/dev/lifecycle/pull-request/github/index.d.ts.map +1 -0
- package/dist/dev/lifecycle/pull-request/github/index.js +2 -0
- package/dist/dev/lifecycle/pull-request/github/index.js.map +1 -0
- package/dist/dev/lifecycle/pull-request/gitlab/gitlab.d.ts +103 -0
- package/dist/dev/lifecycle/pull-request/gitlab/gitlab.d.ts.map +1 -0
- package/dist/dev/lifecycle/pull-request/gitlab/gitlab.js +215 -0
- package/dist/dev/lifecycle/pull-request/gitlab/gitlab.js.map +1 -0
- package/dist/dev/lifecycle/pull-request/gitlab/index.d.ts +2 -0
- package/dist/dev/lifecycle/pull-request/gitlab/index.d.ts.map +1 -0
- package/dist/dev/lifecycle/pull-request/gitlab/index.js +2 -0
- package/dist/dev/lifecycle/pull-request/gitlab/index.js.map +1 -0
- package/dist/dev/lifecycle/pull-request/post-pr/post-pr.d.ts +44 -0
- package/dist/dev/lifecycle/pull-request/post-pr/post-pr.d.ts.map +1 -0
- package/dist/dev/lifecycle/pull-request/post-pr/post-pr.js +64 -0
- package/dist/dev/lifecycle/pull-request/post-pr/post-pr.js.map +1 -0
- package/dist/dev/lifecycle/pull-request/pr-body/index.d.ts +3 -0
- package/dist/dev/lifecycle/pull-request/pr-body/index.d.ts.map +1 -0
- package/dist/dev/lifecycle/pull-request/pr-body/index.js +2 -0
- package/dist/dev/lifecycle/pull-request/pr-body/index.js.map +1 -0
- package/dist/dev/lifecycle/pull-request/pr-body/pr-body.d.ts +65 -0
- package/dist/dev/lifecycle/pull-request/pr-body/pr-body.d.ts.map +1 -0
- package/dist/dev/lifecycle/pull-request/pr-body/pr-body.js +144 -0
- package/dist/dev/lifecycle/pull-request/pr-body/pr-body.js.map +1 -0
- package/dist/dev/lifecycle/pull-request/rework-comment/rework-comment.d.ts +30 -0
- package/dist/dev/lifecycle/pull-request/rework-comment/rework-comment.d.ts.map +1 -0
- package/dist/dev/lifecycle/pull-request/rework-comment/rework-comment.js +39 -0
- package/dist/dev/lifecycle/pull-request/rework-comment/rework-comment.js.map +1 -0
- package/dist/dev/lifecycle/quality/quality.d.ts +99 -0
- package/dist/dev/lifecycle/quality/quality.d.ts.map +1 -0
- package/dist/dev/lifecycle/quality/quality.js +213 -0
- package/dist/dev/lifecycle/quality/quality.js.map +1 -0
- package/dist/dev/lifecycle/resume/resume.d.ts +64 -0
- package/dist/dev/lifecycle/resume/resume.d.ts.map +1 -0
- package/dist/dev/lifecycle/resume/resume.js +171 -0
- package/dist/dev/lifecycle/resume/resume.js.map +1 -0
- package/dist/dev/lifecycle/rework/rework-builders.d.ts +20 -0
- package/dist/dev/lifecycle/rework/rework-builders.d.ts.map +1 -0
- package/dist/dev/lifecycle/rework/rework-builders.js +203 -0
- package/dist/dev/lifecycle/rework/rework-builders.js.map +1 -0
- package/dist/dev/lifecycle/rework/rework-handlers.d.ts +50 -0
- package/dist/dev/lifecycle/rework/rework-handlers.d.ts.map +1 -0
- package/dist/dev/lifecycle/rework/rework-handlers.js +41 -0
- package/dist/dev/lifecycle/rework/rework-handlers.js.map +1 -0
- package/dist/dev/lifecycle/rework/rework.d.ts +63 -0
- package/dist/dev/lifecycle/rework/rework.d.ts.map +1 -0
- package/dist/dev/lifecycle/rework/rework.js +141 -0
- package/dist/dev/lifecycle/rework/rework.js.map +1 -0
- package/dist/dev/pipeline/context.d.ts +105 -0
- package/dist/dev/pipeline/context.d.ts.map +1 -0
- package/dist/dev/pipeline/context.js +107 -0
- package/dist/dev/pipeline/context.js.map +1 -0
- package/dist/dev/pipeline/index.d.ts +6 -0
- package/dist/dev/pipeline/index.d.ts.map +1 -0
- package/dist/dev/pipeline/index.js +5 -0
- package/dist/dev/pipeline/index.js.map +1 -0
- package/dist/dev/pipeline/phases/branch-setup/branch-setup.d.ts +62 -0
- package/dist/dev/pipeline/phases/branch-setup/branch-setup.d.ts.map +1 -0
- package/dist/dev/pipeline/phases/branch-setup/branch-setup.js +128 -0
- package/dist/dev/pipeline/phases/branch-setup/branch-setup.js.map +1 -0
- package/dist/dev/pipeline/phases/branch-setup/index.d.ts +3 -0
- package/dist/dev/pipeline/phases/branch-setup/index.d.ts.map +1 -0
- package/dist/dev/pipeline/phases/branch-setup/index.js +2 -0
- package/dist/dev/pipeline/phases/branch-setup/index.js.map +1 -0
- package/dist/dev/pipeline/phases/cleanup-phase/cleanup-phase.d.ts +32 -0
- package/dist/dev/pipeline/phases/cleanup-phase/cleanup-phase.d.ts.map +1 -0
- package/dist/dev/pipeline/phases/cleanup-phase/cleanup-phase.js +32 -0
- package/dist/dev/pipeline/phases/cleanup-phase/cleanup-phase.js.map +1 -0
- package/dist/dev/pipeline/phases/cleanup-phase/index.d.ts +3 -0
- package/dist/dev/pipeline/phases/cleanup-phase/index.d.ts.map +1 -0
- package/dist/dev/pipeline/phases/cleanup-phase/index.js +2 -0
- package/dist/dev/pipeline/phases/cleanup-phase/index.js.map +1 -0
- package/dist/dev/pipeline/phases/cost-phase/cost-phase.d.ts +40 -0
- package/dist/dev/pipeline/phases/cost-phase/cost-phase.d.ts.map +1 -0
- package/dist/dev/pipeline/phases/cost-phase/cost-phase.js +43 -0
- package/dist/dev/pipeline/phases/cost-phase/cost-phase.js.map +1 -0
- package/dist/dev/pipeline/phases/cost-phase/index.d.ts +3 -0
- package/dist/dev/pipeline/phases/cost-phase/index.d.ts.map +1 -0
- package/dist/dev/pipeline/phases/cost-phase/index.js +2 -0
- package/dist/dev/pipeline/phases/cost-phase/index.js.map +1 -0
- package/dist/dev/pipeline/phases/deliver-phase/deliver-phase.d.ts +68 -0
- package/dist/dev/pipeline/phases/deliver-phase/deliver-phase.d.ts.map +1 -0
- package/dist/dev/pipeline/phases/deliver-phase/deliver-phase.js +125 -0
- package/dist/dev/pipeline/phases/deliver-phase/deliver-phase.js.map +1 -0
- package/dist/dev/pipeline/phases/deliver-phase/index.d.ts +3 -0
- package/dist/dev/pipeline/phases/deliver-phase/index.d.ts.map +1 -0
- package/dist/dev/pipeline/phases/deliver-phase/index.js +2 -0
- package/dist/dev/pipeline/phases/deliver-phase/index.js.map +1 -0
- package/dist/dev/pipeline/phases/dry-run/dry-run.d.ts +38 -0
- package/dist/dev/pipeline/phases/dry-run/dry-run.d.ts.map +1 -0
- package/dist/dev/pipeline/phases/dry-run/dry-run.js +33 -0
- package/dist/dev/pipeline/phases/dry-run/dry-run.js.map +1 -0
- package/dist/dev/pipeline/phases/dry-run/index.d.ts +2 -0
- package/dist/dev/pipeline/phases/dry-run/index.d.ts.map +1 -0
- package/dist/dev/pipeline/phases/dry-run/index.js +2 -0
- package/dist/dev/pipeline/phases/dry-run/index.js.map +1 -0
- package/dist/dev/pipeline/phases/epic-completion/epic-completion.d.ts +48 -0
- package/dist/dev/pipeline/phases/epic-completion/epic-completion.d.ts.map +1 -0
- package/dist/dev/pipeline/phases/epic-completion/epic-completion.js +42 -0
- package/dist/dev/pipeline/phases/epic-completion/epic-completion.js.map +1 -0
- package/dist/dev/pipeline/phases/epic-completion/index.d.ts +3 -0
- package/dist/dev/pipeline/phases/epic-completion/index.d.ts.map +1 -0
- package/dist/dev/pipeline/phases/epic-completion/index.js +2 -0
- package/dist/dev/pipeline/phases/epic-completion/index.js.map +1 -0
- package/dist/dev/pipeline/phases/feasibility/feasibility.d.ts +52 -0
- package/dist/dev/pipeline/phases/feasibility/feasibility.d.ts.map +1 -0
- package/dist/dev/pipeline/phases/feasibility/feasibility.js +34 -0
- package/dist/dev/pipeline/phases/feasibility/feasibility.js.map +1 -0
- package/dist/dev/pipeline/phases/feasibility/index.d.ts +3 -0
- package/dist/dev/pipeline/phases/feasibility/index.d.ts.map +1 -0
- package/dist/dev/pipeline/phases/feasibility/index.js +2 -0
- package/dist/dev/pipeline/phases/feasibility/index.js.map +1 -0
- package/dist/dev/pipeline/phases/index.d.ts +26 -0
- package/dist/dev/pipeline/phases/index.d.ts.map +1 -0
- package/dist/dev/pipeline/phases/index.js +14 -0
- package/dist/dev/pipeline/phases/index.js.map +1 -0
- package/dist/dev/pipeline/phases/lock-check/index.d.ts +3 -0
- package/dist/dev/pipeline/phases/lock-check/index.d.ts.map +1 -0
- package/dist/dev/pipeline/phases/lock-check/index.js +2 -0
- package/dist/dev/pipeline/phases/lock-check/index.js.map +1 -0
- package/dist/dev/pipeline/phases/lock-check/lock-check.d.ts +55 -0
- package/dist/dev/pipeline/phases/lock-check/lock-check.d.ts.map +1 -0
- package/dist/dev/pipeline/phases/lock-check/lock-check.js +60 -0
- package/dist/dev/pipeline/phases/lock-check/lock-check.js.map +1 -0
- package/dist/dev/pipeline/phases/pr-retry/index.d.ts +3 -0
- package/dist/dev/pipeline/phases/pr-retry/index.d.ts.map +1 -0
- package/dist/dev/pipeline/phases/pr-retry/index.js +2 -0
- package/dist/dev/pipeline/phases/pr-retry/index.js.map +1 -0
- package/dist/dev/pipeline/phases/pr-retry/pr-retry.d.ts +58 -0
- package/dist/dev/pipeline/phases/pr-retry/pr-retry.d.ts.map +1 -0
- package/dist/dev/pipeline/phases/pr-retry/pr-retry.js +82 -0
- package/dist/dev/pipeline/phases/pr-retry/pr-retry.js.map +1 -0
- package/dist/dev/pipeline/phases/preflight-phase/index.d.ts +3 -0
- package/dist/dev/pipeline/phases/preflight-phase/index.d.ts.map +1 -0
- package/dist/dev/pipeline/phases/preflight-phase/index.js +2 -0
- package/dist/dev/pipeline/phases/preflight-phase/index.js.map +1 -0
- package/dist/dev/pipeline/phases/preflight-phase/preflight-phase.d.ts +42 -0
- package/dist/dev/pipeline/phases/preflight-phase/preflight-phase.d.ts.map +1 -0
- package/dist/dev/pipeline/phases/preflight-phase/preflight-phase.js +41 -0
- package/dist/dev/pipeline/phases/preflight-phase/preflight-phase.js.map +1 -0
- package/dist/dev/pipeline/phases/rework-detection/index.d.ts +3 -0
- package/dist/dev/pipeline/phases/rework-detection/index.d.ts.map +1 -0
- package/dist/dev/pipeline/phases/rework-detection/index.js +2 -0
- package/dist/dev/pipeline/phases/rework-detection/index.js.map +1 -0
- package/dist/dev/pipeline/phases/rework-detection/rework-detection.d.ts +40 -0
- package/dist/dev/pipeline/phases/rework-detection/rework-detection.d.ts.map +1 -0
- package/dist/dev/pipeline/phases/rework-detection/rework-detection.js +38 -0
- package/dist/dev/pipeline/phases/rework-detection/rework-detection.js.map +1 -0
- package/dist/dev/pipeline/phases/ticket-fetch/index.d.ts +3 -0
- package/dist/dev/pipeline/phases/ticket-fetch/index.d.ts.map +1 -0
- package/dist/dev/pipeline/phases/ticket-fetch/index.js +2 -0
- package/dist/dev/pipeline/phases/ticket-fetch/index.js.map +1 -0
- package/dist/dev/pipeline/phases/ticket-fetch/ticket-fetch.d.ts +46 -0
- package/dist/dev/pipeline/phases/ticket-fetch/ticket-fetch.d.ts.map +1 -0
- package/dist/dev/pipeline/phases/ticket-fetch/ticket-fetch.js +64 -0
- package/dist/dev/pipeline/phases/ticket-fetch/ticket-fetch.js.map +1 -0
- package/dist/dev/pipeline/phases/transition/index.d.ts +3 -0
- package/dist/dev/pipeline/phases/transition/index.d.ts.map +1 -0
- package/dist/dev/pipeline/phases/transition/index.js +2 -0
- package/dist/dev/pipeline/phases/transition/index.js.map +1 -0
- package/dist/dev/pipeline/phases/transition/transition.d.ts +30 -0
- package/dist/dev/pipeline/phases/transition/transition.d.ts.map +1 -0
- package/dist/dev/pipeline/phases/transition/transition.js +27 -0
- package/dist/dev/pipeline/phases/transition/transition.js.map +1 -0
- package/dist/dev/pipeline/run-pipeline.d.ts +98 -0
- package/dist/dev/pipeline/run-pipeline.d.ts.map +1 -0
- package/dist/dev/pipeline/run-pipeline.js +106 -0
- package/dist/dev/pipeline/run-pipeline.js.map +1 -0
- package/dist/index.d.ts +58 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +58 -0
- package/dist/index.js.map +1 -0
- package/dist/schemas/azdo/azdo-pr.d.ts +58 -0
- package/dist/schemas/azdo/azdo-pr.d.ts.map +1 -0
- package/dist/schemas/azdo/azdo-pr.js +48 -0
- package/dist/schemas/azdo/azdo-pr.js.map +1 -0
- package/dist/schemas/azdo/azdo.d.ts +88 -0
- package/dist/schemas/azdo/azdo.d.ts.map +1 -0
- package/dist/schemas/azdo/azdo.js +60 -0
- package/dist/schemas/azdo/azdo.js.map +1 -0
- package/dist/schemas/bitbucket/bitbucket.d.ts +112 -0
- package/dist/schemas/bitbucket/bitbucket.d.ts.map +1 -0
- package/dist/schemas/bitbucket/bitbucket.js +73 -0
- package/dist/schemas/bitbucket/bitbucket.js.map +1 -0
- package/dist/schemas/env/env.d.ts +336 -0
- package/dist/schemas/env/env.d.ts.map +1 -0
- package/dist/schemas/env/env.js +94 -0
- package/dist/schemas/env/env.js.map +1 -0
- package/dist/schemas/github/github.d.ts +128 -0
- package/dist/schemas/github/github.d.ts.map +1 -0
- package/dist/schemas/github/github.js +65 -0
- package/dist/schemas/github/github.js.map +1 -0
- package/dist/schemas/gitlab/gitlab.d.ts +72 -0
- package/dist/schemas/gitlab/gitlab.d.ts.map +1 -0
- package/dist/schemas/gitlab/gitlab.js +38 -0
- package/dist/schemas/gitlab/gitlab.js.map +1 -0
- package/dist/schemas/index.d.ts +15 -0
- package/dist/schemas/index.d.ts.map +1 -0
- package/dist/schemas/index.js +8 -0
- package/dist/schemas/index.js.map +1 -0
- package/dist/schemas/jira/jira.d.ts +79 -0
- package/dist/schemas/jira/jira.d.ts.map +1 -0
- package/dist/schemas/jira/jira.js +69 -0
- package/dist/schemas/jira/jira.js.map +1 -0
- package/dist/schemas/linear/linear.d.ts +178 -0
- package/dist/schemas/linear/linear.d.ts.map +1 -0
- package/dist/schemas/linear/linear.js +136 -0
- package/dist/schemas/linear/linear.js.map +1 -0
- package/dist/schemas/notion/notion.d.ts +131 -0
- package/dist/schemas/notion/notion.d.ts.map +1 -0
- package/dist/schemas/notion/notion.js +102 -0
- package/dist/schemas/notion/notion.js.map +1 -0
- package/dist/schemas/shortcut/shortcut.d.ts +149 -0
- package/dist/schemas/shortcut/shortcut.d.ts.map +1 -0
- package/dist/schemas/shortcut/shortcut.js +68 -0
- package/dist/schemas/shortcut/shortcut.js.map +1 -0
- package/dist/shared/cache/cache.d.ts +14 -0
- package/dist/shared/cache/cache.d.ts.map +1 -0
- package/dist/shared/cache/cache.js +25 -0
- package/dist/shared/cache/cache.js.map +1 -0
- package/dist/shared/cache/index.d.ts +2 -0
- package/dist/shared/cache/index.d.ts.map +1 -0
- package/dist/shared/cache/index.js +2 -0
- package/dist/shared/cache/index.js.map +1 -0
- package/dist/shared/env-parser/env-parser.d.ts +42 -0
- package/dist/shared/env-parser/env-parser.d.ts.map +1 -0
- package/dist/shared/env-parser/env-parser.js +97 -0
- package/dist/shared/env-parser/env-parser.js.map +1 -0
- package/dist/shared/env-parser/index.d.ts +3 -0
- package/dist/shared/env-parser/index.d.ts.map +1 -0
- package/dist/shared/env-parser/index.js +2 -0
- package/dist/shared/env-parser/index.js.map +1 -0
- package/dist/shared/git-ops/git-ops.d.ts +127 -0
- package/dist/shared/git-ops/git-ops.d.ts.map +1 -0
- package/dist/shared/git-ops/git-ops.js +225 -0
- package/dist/shared/git-ops/git-ops.js.map +1 -0
- package/dist/shared/git-ops/index.d.ts +3 -0
- package/dist/shared/git-ops/index.d.ts.map +1 -0
- package/dist/shared/git-ops/index.js +2 -0
- package/dist/shared/git-ops/index.js.map +1 -0
- package/dist/shared/git-token/git-token.d.ts +18 -0
- package/dist/shared/git-token/git-token.d.ts.map +1 -0
- package/dist/shared/git-token/git-token.js +28 -0
- package/dist/shared/git-token/git-token.js.map +1 -0
- package/dist/shared/git-token/index.d.ts +2 -0
- package/dist/shared/git-token/index.d.ts.map +1 -0
- package/dist/shared/git-token/index.js +2 -0
- package/dist/shared/git-token/index.js.map +1 -0
- package/dist/shared/http/fetch-and-parse/fetch-and-parse.d.ts +32 -0
- package/dist/shared/http/fetch-and-parse/fetch-and-parse.d.ts.map +1 -0
- package/dist/shared/http/fetch-and-parse/fetch-and-parse.js +53 -0
- package/dist/shared/http/fetch-and-parse/fetch-and-parse.js.map +1 -0
- package/dist/shared/http/fetch-and-parse/index.d.ts +3 -0
- package/dist/shared/http/fetch-and-parse/index.d.ts.map +1 -0
- package/dist/shared/http/fetch-and-parse/index.js +2 -0
- package/dist/shared/http/fetch-and-parse/index.js.map +1 -0
- package/dist/shared/http/index.d.ts +7 -0
- package/dist/shared/http/index.d.ts.map +1 -0
- package/dist/shared/http/index.js +4 -0
- package/dist/shared/http/index.js.map +1 -0
- package/dist/shared/http/ping-endpoint/index.d.ts +3 -0
- package/dist/shared/http/ping-endpoint/index.d.ts.map +1 -0
- package/dist/shared/http/ping-endpoint/index.js +2 -0
- package/dist/shared/http/ping-endpoint/index.js.map +1 -0
- package/dist/shared/http/ping-endpoint/ping-endpoint.d.ts +29 -0
- package/dist/shared/http/ping-endpoint/ping-endpoint.d.ts.map +1 -0
- package/dist/shared/http/ping-endpoint/ping-endpoint.js +31 -0
- package/dist/shared/http/ping-endpoint/ping-endpoint.js.map +1 -0
- package/dist/shared/http/retry-fetch/index.d.ts +3 -0
- package/dist/shared/http/retry-fetch/index.d.ts.map +1 -0
- package/dist/shared/http/retry-fetch/index.js +2 -0
- package/dist/shared/http/retry-fetch/index.js.map +1 -0
- package/dist/shared/http/retry-fetch/retry-fetch.d.ts +33 -0
- package/dist/shared/http/retry-fetch/retry-fetch.d.ts.map +1 -0
- package/dist/shared/http/retry-fetch/retry-fetch.js +94 -0
- package/dist/shared/http/retry-fetch/retry-fetch.js.map +1 -0
- package/dist/shared/label-helpers/index.d.ts +3 -0
- package/dist/shared/label-helpers/index.d.ts.map +1 -0
- package/dist/shared/label-helpers/index.js +2 -0
- package/dist/shared/label-helpers/index.js.map +1 -0
- package/dist/shared/label-helpers/label-helpers.d.ts +41 -0
- package/dist/shared/label-helpers/label-helpers.d.ts.map +1 -0
- package/dist/shared/label-helpers/label-helpers.js +51 -0
- package/dist/shared/label-helpers/label-helpers.js.map +1 -0
- package/dist/shared/remote/index.d.ts +2 -0
- package/dist/shared/remote/index.d.ts.map +1 -0
- package/dist/shared/remote/index.js +2 -0
- package/dist/shared/remote/index.js.map +1 -0
- package/dist/shared/remote/remote.d.ts +39 -0
- package/dist/shared/remote/remote.d.ts.map +1 -0
- package/dist/shared/remote/remote.js +180 -0
- package/dist/shared/remote/remote.js.map +1 -0
- package/dist/types/board.d.ts +62 -0
- package/dist/types/board.d.ts.map +1 -0
- package/dist/types/board.js +5 -0
- package/dist/types/board.js.map +1 -0
- package/dist/types/index.d.ts +5 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/index.js +2 -0
- package/dist/types/index.js.map +1 -0
- package/dist/types/progress.d.ts +21 -0
- package/dist/types/progress.d.ts.map +1 -0
- package/dist/types/progress.js +34 -0
- package/dist/types/progress.js.map +1 -0
- package/dist/types/remote.d.ts +77 -0
- package/dist/types/remote.d.ts.map +1 -0
- package/dist/types/remote.js +5 -0
- package/dist/types/remote.js.map +1 -0
- package/package.json +44 -0
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
/** Timeout in milliseconds for PR creation requests. */
|
|
2
|
+
const REQUEST_TIMEOUT_MS = 30_000;
|
|
3
|
+
/**
|
|
4
|
+
* POST a pull request / merge request and return a typed result.
|
|
5
|
+
*
|
|
6
|
+
* Handles the common try/catch, response parsing, error formatting,
|
|
7
|
+
* and "already exists" detection shared by all git host implementations.
|
|
8
|
+
*
|
|
9
|
+
* @param opts - Request options including fetch, URL, headers, body, and callbacks.
|
|
10
|
+
* @returns A typed `PrCreationResult`.
|
|
11
|
+
*/
|
|
12
|
+
export async function postPullRequest(opts) {
|
|
13
|
+
const { fetchFn, url, headers, body, parseSuccess, isAlreadyExists } = opts;
|
|
14
|
+
const controller = new AbortController();
|
|
15
|
+
const timeout = setTimeout(() => controller.abort(), REQUEST_TIMEOUT_MS);
|
|
16
|
+
try {
|
|
17
|
+
const response = await fetchFn(url, {
|
|
18
|
+
method: 'POST',
|
|
19
|
+
headers: { ...headers, 'Content-Type': 'application/json' },
|
|
20
|
+
body: JSON.stringify(body),
|
|
21
|
+
signal: controller.signal,
|
|
22
|
+
});
|
|
23
|
+
if (!response.ok) {
|
|
24
|
+
const text = await response.text().catch(() => '');
|
|
25
|
+
const alreadyExists = isAlreadyExists?.(response.status, text) ?? false;
|
|
26
|
+
return {
|
|
27
|
+
ok: false,
|
|
28
|
+
error: `HTTP ${response.status}${text ? `: ${text.slice(0, 200)}` : ''}`,
|
|
29
|
+
alreadyExists,
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
const json = await response.json();
|
|
33
|
+
const parsed = parseSuccess(json);
|
|
34
|
+
if (!parsed.url && !parsed.number) {
|
|
35
|
+
return {
|
|
36
|
+
ok: false,
|
|
37
|
+
error: 'PR created but response missing URL and number',
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
return { ok: true, url: parsed.url, number: parsed.number };
|
|
41
|
+
}
|
|
42
|
+
catch (err) {
|
|
43
|
+
return {
|
|
44
|
+
ok: false,
|
|
45
|
+
error: err instanceof Error ? err.message : String(err),
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
finally {
|
|
49
|
+
clearTimeout(timeout);
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Build a Basic Auth header value from username and token.
|
|
54
|
+
*
|
|
55
|
+
* Used by Bitbucket Cloud and Azure DevOps for HTTP Basic Auth.
|
|
56
|
+
*
|
|
57
|
+
* @param username - The username (empty string for AzDO PAT auth).
|
|
58
|
+
* @param token - The token or app password.
|
|
59
|
+
* @returns The `Basic {base64}` header value.
|
|
60
|
+
*/
|
|
61
|
+
export function basicAuth(username, token) {
|
|
62
|
+
return `Basic ${Buffer.from(`${username}:${token}`).toString('base64')}`;
|
|
63
|
+
}
|
|
64
|
+
//# sourceMappingURL=post-pr.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"post-pr.js","sourceRoot":"","sources":["../../../../../src/dev/lifecycle/pull-request/post-pr/post-pr.ts"],"names":[],"mappings":"AAyBA,wDAAwD;AACxD,MAAM,kBAAkB,GAAG,MAAM,CAAC;AAElC;;;;;;;;GAQG;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,IAAI,CAAC,MAAM,CAAC,MAAM,EAAE,CAAC;YAClC,OAAO;gBACL,EAAE,EAAE,KAAK;gBACT,KAAK,EAAE,gDAAgD;aACxD,CAAC;QACJ,CAAC;QAED,OAAO,EAAE,EAAE,EAAE,IAAI,EAAE,GAAG,EAAE,MAAM,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,CAAC;IAC9D,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,OAAO;YACL,EAAE,EAAE,KAAK;YACT,KAAK,EAAE,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC;SACxD,CAAC;IACJ,CAAC;YAAS,CAAC;QACT,YAAY,CAAC,OAAO,CAAC,CAAC;IACxB,CAAC;AACH,CAAC;AAED;;;;;;;;GAQG;AACH,MAAM,UAAU,SAAS,CAAC,QAAgB,EAAE,KAAa;IACvD,OAAO,SAAS,MAAM,CAAC,IAAI,CAAC,GAAG,QAAQ,IAAI,KAAK,EAAE,CAAC,CAAC,QAAQ,CAAC,QAAQ,CAAC,EAAE,CAAC;AAC3E,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/dev/lifecycle/pull-request/pr-body/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAChD,OAAO,EAAE,eAAe,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/dev/lifecycle/pull-request/pr-body/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC"}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* PR/MR body builder.
|
|
3
|
+
*
|
|
4
|
+
* Constructs the pull request description with a link back to the
|
|
5
|
+
* board ticket and a Clancy footer.
|
|
6
|
+
*/
|
|
7
|
+
import type { ProgressEntry } from '../../../../dev/lifecycle/progress/index.js';
|
|
8
|
+
import type { BoardConfig } from '../../../../schemas/env/env.js';
|
|
9
|
+
import type { Ticket } from '../../../../types/index.js';
|
|
10
|
+
/** Epic context for child PRs targeting an epic/milestone branch. */
|
|
11
|
+
export type EpicContext = {
|
|
12
|
+
/** Parent epic key (e.g., `'#49'`, `'PROJ-100'`). */
|
|
13
|
+
readonly parentKey: string;
|
|
14
|
+
/** Number of sibling tickets already delivered to the epic branch. */
|
|
15
|
+
readonly siblingsDelivered: number;
|
|
16
|
+
/** Target epic branch name (e.g., `'milestone/49'`). */
|
|
17
|
+
readonly epicBranch: string;
|
|
18
|
+
};
|
|
19
|
+
/** Options for {@link buildPrBody}. */
|
|
20
|
+
type BuildPrBodyOpts = {
|
|
21
|
+
readonly config: BoardConfig;
|
|
22
|
+
readonly ticket: Ticket;
|
|
23
|
+
readonly targetBranch?: string;
|
|
24
|
+
readonly verificationWarning?: string;
|
|
25
|
+
readonly singleChildParent?: string;
|
|
26
|
+
readonly epicContext?: EpicContext;
|
|
27
|
+
};
|
|
28
|
+
/** Options for {@link buildEpicPrBody}. */
|
|
29
|
+
type BuildEpicPrBodyOpts = {
|
|
30
|
+
readonly epicKey: string;
|
|
31
|
+
readonly epicTitle: string;
|
|
32
|
+
readonly childEntries: readonly ProgressEntry[];
|
|
33
|
+
readonly provider?: string;
|
|
34
|
+
};
|
|
35
|
+
/**
|
|
36
|
+
* Check whether a target branch is an epic or milestone branch.
|
|
37
|
+
*
|
|
38
|
+
* @param targetBranch - The branch the PR targets.
|
|
39
|
+
* @returns `true` if it's an epic (`epic/`) or milestone (`milestone/`) branch.
|
|
40
|
+
*/
|
|
41
|
+
export declare function isEpicBranch(targetBranch: string): boolean;
|
|
42
|
+
/**
|
|
43
|
+
* Build the PR/MR body for a ticket.
|
|
44
|
+
*
|
|
45
|
+
* Includes a link back to the board ticket (auto-close for GitHub Issues
|
|
46
|
+
* when targeting the base branch, or "Part of" when targeting an epic branch)
|
|
47
|
+
* and a Clancy attribution footer.
|
|
48
|
+
*
|
|
49
|
+
* @param opts - Build options including config, ticket, and optional context.
|
|
50
|
+
* @returns The PR body as a markdown string.
|
|
51
|
+
*/
|
|
52
|
+
export declare function buildPrBody(opts: BuildPrBodyOpts): string;
|
|
53
|
+
/**
|
|
54
|
+
* Build the PR body for the final epic PR (epic branch → base branch).
|
|
55
|
+
*
|
|
56
|
+
* Lists all child tickets with their PR numbers for traceability.
|
|
57
|
+
* For GitHub, includes `Closes` keywords to auto-close child issues
|
|
58
|
+
* and the parent epic when the PR is merged to the default branch.
|
|
59
|
+
*
|
|
60
|
+
* @param opts - Build options including epic key, title, children, and provider.
|
|
61
|
+
* @returns The epic PR body as a markdown string.
|
|
62
|
+
*/
|
|
63
|
+
export declare function buildEpicPrBody(opts: BuildEpicPrBodyOpts): string;
|
|
64
|
+
export {};
|
|
65
|
+
//# sourceMappingURL=pr-body.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pr-body.d.ts","sourceRoot":"","sources":["../../../../../src/dev/lifecycle/pull-request/pr-body/pr-body.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAC;AACzE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAC1D,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAEjD,qEAAqE;AACrE,MAAM,MAAM,WAAW,GAAG;IACxB,qDAAqD;IACrD,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,sEAAsE;IACtE,QAAQ,CAAC,iBAAiB,EAAE,MAAM,CAAC;IACnC,wDAAwD;IACxD,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;CAC7B,CAAC;AAEF,uCAAuC;AACvC,KAAK,eAAe,GAAG;IACrB,QAAQ,CAAC,MAAM,EAAE,WAAW,CAAC;IAC7B,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,YAAY,CAAC,EAAE,MAAM,CAAC;IAC/B,QAAQ,CAAC,mBAAmB,CAAC,EAAE,MAAM,CAAC;IACtC,QAAQ,CAAC,iBAAiB,CAAC,EAAE,MAAM,CAAC;IACpC,QAAQ,CAAC,WAAW,CAAC,EAAE,WAAW,CAAC;CACpC,CAAC;AAEF,2CAA2C;AAC3C,KAAK,mBAAmB,GAAG;IACzB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,YAAY,EAAE,SAAS,aAAa,EAAE,CAAC;IAChD,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;CAC5B,CAAC;AAEF;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,YAAY,EAAE,MAAM,GAAG,OAAO,CAI1D;AAED;;;;;;;;;GASG;AACH,wBAAgB,WAAW,CAAC,IAAI,EAAE,eAAe,GAAG,MAAM,CAezD;AAED;;;;;;;;;GASG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAAE,mBAAmB,GAAG,MAAM,CAwBjE"}
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Check whether a target branch is an epic or milestone branch.
|
|
3
|
+
*
|
|
4
|
+
* @param targetBranch - The branch the PR targets.
|
|
5
|
+
* @returns `true` if it's an epic (`epic/`) or milestone (`milestone/`) branch.
|
|
6
|
+
*/
|
|
7
|
+
export function isEpicBranch(targetBranch) {
|
|
8
|
+
return (targetBranch.startsWith('epic/') || targetBranch.startsWith('milestone/'));
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Build the PR/MR body for a ticket.
|
|
12
|
+
*
|
|
13
|
+
* Includes a link back to the board ticket (auto-close for GitHub Issues
|
|
14
|
+
* when targeting the base branch, or "Part of" when targeting an epic branch)
|
|
15
|
+
* and a Clancy attribution footer.
|
|
16
|
+
*
|
|
17
|
+
* @param opts - Build options including config, ticket, and optional context.
|
|
18
|
+
* @returns The PR body as a markdown string.
|
|
19
|
+
*/
|
|
20
|
+
export function buildPrBody(opts) {
|
|
21
|
+
const { config, ticket, targetBranch, verificationWarning } = opts;
|
|
22
|
+
const { singleChildParent, epicContext } = opts;
|
|
23
|
+
const isEpic = targetBranch ? isEpicBranch(targetBranch) : false;
|
|
24
|
+
const sections = [
|
|
25
|
+
...epicBannerLines(epicContext, isEpic),
|
|
26
|
+
...ticketReferenceLines({ config, ticket, isEpic, singleChildParent }),
|
|
27
|
+
'',
|
|
28
|
+
...descriptionLines(ticket.description),
|
|
29
|
+
...verificationLines(verificationWarning),
|
|
30
|
+
...footerLines(),
|
|
31
|
+
];
|
|
32
|
+
return sections.join('\n');
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Build the PR body for the final epic PR (epic branch → base branch).
|
|
36
|
+
*
|
|
37
|
+
* Lists all child tickets with their PR numbers for traceability.
|
|
38
|
+
* For GitHub, includes `Closes` keywords to auto-close child issues
|
|
39
|
+
* and the parent epic when the PR is merged to the default branch.
|
|
40
|
+
*
|
|
41
|
+
* @param opts - Build options including epic key, title, children, and provider.
|
|
42
|
+
* @returns The epic PR body as a markdown string.
|
|
43
|
+
*/
|
|
44
|
+
export function buildEpicPrBody(opts) {
|
|
45
|
+
const { epicKey, epicTitle, childEntries, provider } = opts;
|
|
46
|
+
const childLines = childEntries.map((entry) => {
|
|
47
|
+
const prRef = entry.prNumber ? ` (#${entry.prNumber})` : '';
|
|
48
|
+
return `- ${entry.key} — ${entry.summary}${prRef}`;
|
|
49
|
+
});
|
|
50
|
+
const closesLines = provider === 'github' ? githubClosesLines(epicKey, childEntries) : [];
|
|
51
|
+
const sections = [
|
|
52
|
+
`## ${epicKey} — ${epicTitle}`,
|
|
53
|
+
'',
|
|
54
|
+
'### Children',
|
|
55
|
+
'',
|
|
56
|
+
...childLines,
|
|
57
|
+
...closesLines,
|
|
58
|
+
'',
|
|
59
|
+
'---',
|
|
60
|
+
'*Created by [Clancy](https://github.com/Pushedskydiver/chief-clancy)*',
|
|
61
|
+
];
|
|
62
|
+
return sections.join('\n');
|
|
63
|
+
}
|
|
64
|
+
// ─── private helpers ────────────────────────────────────────────────────────
|
|
65
|
+
function epicBannerLines(epic, isEpic) {
|
|
66
|
+
if (!epic || !isEpic)
|
|
67
|
+
return [];
|
|
68
|
+
const delivered = epic.siblingsDelivered;
|
|
69
|
+
const deliveredText = delivered === 0
|
|
70
|
+
? 'No siblings delivered yet'
|
|
71
|
+
: `${delivered} sibling${delivered === 1 ? '' : 's'} previously delivered to \`${epic.epicBranch}\``;
|
|
72
|
+
return [
|
|
73
|
+
`## Part of epic ${epic.parentKey}`,
|
|
74
|
+
deliveredText,
|
|
75
|
+
'',
|
|
76
|
+
`> This PR targets \`${epic.epicBranch}\`. A final epic PR will be created when all children are complete.`,
|
|
77
|
+
'',
|
|
78
|
+
];
|
|
79
|
+
}
|
|
80
|
+
function ticketReferenceLines(opts) {
|
|
81
|
+
const { config, ticket, isEpic, singleChildParent } = opts;
|
|
82
|
+
switch (config.provider) {
|
|
83
|
+
case 'github': {
|
|
84
|
+
const ref = isEpic ? `Part of ${ticket.key}` : `Closes ${ticket.key}`;
|
|
85
|
+
const parentClose = singleChildParent && !isEpic ? [`Closes ${singleChildParent}`] : [];
|
|
86
|
+
return [ref, ...parentClose];
|
|
87
|
+
}
|
|
88
|
+
case 'jira':
|
|
89
|
+
return [
|
|
90
|
+
`**Jira:** [${ticket.key}](${config.env.JIRA_BASE_URL}/browse/${ticket.key})`,
|
|
91
|
+
];
|
|
92
|
+
case 'linear':
|
|
93
|
+
return [`**Linear:** ${ticket.key}`];
|
|
94
|
+
case 'shortcut':
|
|
95
|
+
case 'notion':
|
|
96
|
+
case 'azdo':
|
|
97
|
+
return [`**Ticket:** ${ticket.key}`];
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
function descriptionLines(description) {
|
|
101
|
+
if (!description)
|
|
102
|
+
return [];
|
|
103
|
+
return ['## Description', '', description, ''];
|
|
104
|
+
}
|
|
105
|
+
function verificationLines(warning) {
|
|
106
|
+
if (!warning)
|
|
107
|
+
return [];
|
|
108
|
+
return [
|
|
109
|
+
'## ⚠ Verification Warning',
|
|
110
|
+
'',
|
|
111
|
+
warning,
|
|
112
|
+
'',
|
|
113
|
+
'This PR may need manual fixes before merging.',
|
|
114
|
+
'',
|
|
115
|
+
];
|
|
116
|
+
}
|
|
117
|
+
const FOOTER = `---
|
|
118
|
+
*Created by [Clancy](https://github.com/Pushedskydiver/chief-clancy)*
|
|
119
|
+
|
|
120
|
+
---
|
|
121
|
+
<details>
|
|
122
|
+
<summary><strong>Rework instructions</strong> (click to expand)</summary>
|
|
123
|
+
|
|
124
|
+
To request changes:
|
|
125
|
+
- **Code comments** — leave inline comments on specific lines. These are always picked up automatically.
|
|
126
|
+
- **General feedback** — reply with a comment starting with \`Rework:\` followed by what needs fixing. Comments without the \`Rework:\` prefix are treated as discussion.
|
|
127
|
+
|
|
128
|
+
Example: \`Rework: The form validation doesn't handle empty passwords\`
|
|
129
|
+
|
|
130
|
+
</details>`;
|
|
131
|
+
function footerLines() {
|
|
132
|
+
return FOOTER.split('\n');
|
|
133
|
+
}
|
|
134
|
+
function githubClosesLines(epicKey, childEntries) {
|
|
135
|
+
const childKeys = childEntries
|
|
136
|
+
.map((e) => e.key)
|
|
137
|
+
.filter((k) => k.startsWith('#'));
|
|
138
|
+
const epicPrefix = epicKey.startsWith('#') ? [epicKey] : [];
|
|
139
|
+
const issueKeys = [...epicPrefix, ...childKeys];
|
|
140
|
+
if (issueKeys.length === 0)
|
|
141
|
+
return [];
|
|
142
|
+
return ['', '### Closes', '', issueKeys.map((k) => `Closes ${k}`).join(', ')];
|
|
143
|
+
}
|
|
144
|
+
//# sourceMappingURL=pr-body.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pr-body.js","sourceRoot":"","sources":["../../../../../src/dev/lifecycle/pull-request/pr-body/pr-body.ts"],"names":[],"mappings":"AAsCA;;;;;GAKG;AACH,MAAM,UAAU,YAAY,CAAC,YAAoB;IAC/C,OAAO,CACL,YAAY,CAAC,UAAU,CAAC,OAAO,CAAC,IAAI,YAAY,CAAC,UAAU,CAAC,YAAY,CAAC,CAC1E,CAAC;AACJ,CAAC;AAED;;;;;;;;;GASG;AACH,MAAM,UAAU,WAAW,CAAC,IAAqB;IAC/C,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,YAAY,EAAE,mBAAmB,EAAE,GAAG,IAAI,CAAC;IACnE,MAAM,EAAE,iBAAiB,EAAE,WAAW,EAAE,GAAG,IAAI,CAAC;IAChD,MAAM,MAAM,GAAG,YAAY,CAAC,CAAC,CAAC,YAAY,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC;IAEjE,MAAM,QAAQ,GAAG;QACf,GAAG,eAAe,CAAC,WAAW,EAAE,MAAM,CAAC;QACvC,GAAG,oBAAoB,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,iBAAiB,EAAE,CAAC;QACtE,EAAE;QACF,GAAG,gBAAgB,CAAC,MAAM,CAAC,WAAW,CAAC;QACvC,GAAG,iBAAiB,CAAC,mBAAmB,CAAC;QACzC,GAAG,WAAW,EAAE;KACjB,CAAC;IAEF,OAAO,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAC7B,CAAC;AAED;;;;;;;;;GASG;AACH,MAAM,UAAU,eAAe,CAAC,IAAyB;IACvD,MAAM,EAAE,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,QAAQ,EAAE,GAAG,IAAI,CAAC;IAE5D,MAAM,UAAU,GAAG,YAAY,CAAC,GAAG,CAAC,CAAC,KAAK,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EZ,SAAS,WAAW;IAClB,OAAO,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;AAC5B,CAAC;AAED,SAAS,iBAAiB,CACxB,OAAe,EACf,YAAsC;IAEtC,MAAM,SAAS,GAAG,YAAY;SAC3B,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC;SACjB,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC;IAEpC,MAAM,UAAU,GAAG,OAAO,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;IAC5D,MAAM,SAAS,GAAG,CAAC,GAAG,UAAU,EAAE,GAAG,SAAS,CAAC,CAAC;IAEhD,IAAI,SAAS,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,EAAE,CAAC;IACtC,OAAO,CAAC,EAAE,EAAE,YAAY,EAAE,EAAE,EAAE,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,UAAU,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;AAChF,CAAC"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Rework comment detection and extraction utilities.
|
|
3
|
+
*
|
|
4
|
+
* Comments starting with "Rework:" (case-insensitive) are treated as
|
|
5
|
+
* rework requests. All other comments are treated as discussion and ignored.
|
|
6
|
+
*/
|
|
7
|
+
/**
|
|
8
|
+
* Check if a comment is a rework request (starts with "Rework:" case-insensitive).
|
|
9
|
+
*
|
|
10
|
+
* @param body - The comment body to check.
|
|
11
|
+
* @returns `true` if the comment starts with "Rework:".
|
|
12
|
+
*/
|
|
13
|
+
export declare function isReworkComment(body: string): boolean;
|
|
14
|
+
/**
|
|
15
|
+
* Check if a comment was posted by Clancy's automation (starts with `[clancy]`).
|
|
16
|
+
*
|
|
17
|
+
* @param body - The comment body to check.
|
|
18
|
+
* @returns `true` if the comment starts with `[clancy]`.
|
|
19
|
+
*/
|
|
20
|
+
export declare function isClancyComment(body: string): boolean;
|
|
21
|
+
/**
|
|
22
|
+
* Extract the rework description from a "Rework: ..." comment.
|
|
23
|
+
*
|
|
24
|
+
* Strips the "Rework:" prefix and returns the remaining content trimmed.
|
|
25
|
+
*
|
|
26
|
+
* @param body - The full comment body starting with "Rework:".
|
|
27
|
+
* @returns The description after the prefix.
|
|
28
|
+
*/
|
|
29
|
+
export declare function extractReworkContent(body: string): string;
|
|
30
|
+
//# sourceMappingURL=rework-comment.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rework-comment.d.ts","sourceRoot":"","sources":["../../../../../src/dev/lifecycle/pull-request/rework-comment/rework-comment.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH;;;;;GAKG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAErD;AAED;;;;;GAKG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAErD;AAED;;;;;;;GAOG;AACH,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAKzD"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Rework comment detection and extraction utilities.
|
|
3
|
+
*
|
|
4
|
+
* Comments starting with "Rework:" (case-insensitive) are treated as
|
|
5
|
+
* rework requests. All other comments are treated as discussion and ignored.
|
|
6
|
+
*/
|
|
7
|
+
/**
|
|
8
|
+
* Check if a comment is a rework request (starts with "Rework:" case-insensitive).
|
|
9
|
+
*
|
|
10
|
+
* @param body - The comment body to check.
|
|
11
|
+
* @returns `true` if the comment starts with "Rework:".
|
|
12
|
+
*/
|
|
13
|
+
export function isReworkComment(body) {
|
|
14
|
+
return body.trim().toLowerCase().startsWith('rework:');
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Check if a comment was posted by Clancy's automation (starts with `[clancy]`).
|
|
18
|
+
*
|
|
19
|
+
* @param body - The comment body to check.
|
|
20
|
+
* @returns `true` if the comment starts with `[clancy]`.
|
|
21
|
+
*/
|
|
22
|
+
export function isClancyComment(body) {
|
|
23
|
+
return body.trimStart().startsWith('[clancy]');
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Extract the rework description from a "Rework: ..." comment.
|
|
27
|
+
*
|
|
28
|
+
* Strips the "Rework:" prefix and returns the remaining content trimmed.
|
|
29
|
+
*
|
|
30
|
+
* @param body - The full comment body starting with "Rework:".
|
|
31
|
+
* @returns The description after the prefix.
|
|
32
|
+
*/
|
|
33
|
+
export function extractReworkContent(body) {
|
|
34
|
+
return body
|
|
35
|
+
.trim()
|
|
36
|
+
.replace(/^rework:\s*/i, '')
|
|
37
|
+
.trim();
|
|
38
|
+
}
|
|
39
|
+
//# sourceMappingURL=rework-comment.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rework-comment.js","sourceRoot":"","sources":["../../../../../src/dev/lifecycle/pull-request/rework-comment/rework-comment.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH;;;;;GAKG;AACH,MAAM,UAAU,eAAe,CAAC,IAAY;IAC1C,OAAO,IAAI,CAAC,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC;AACzD,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,eAAe,CAAC,IAAY;IAC1C,OAAO,IAAI,CAAC,SAAS,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC,CAAC;AACjD,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,UAAU,oBAAoB,CAAC,IAAY;IAC/C,OAAO,IAAI;SACR,IAAI,EAAE;SACN,OAAO,CAAC,cAAc,EAAE,EAAE,CAAC;SAC3B,IAAI,EAAE,CAAC;AACZ,CAAC"}
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
/** Injected filesystem operations for quality data I/O. */
|
|
2
|
+
export type QualityFs = {
|
|
3
|
+
/** Read a file as UTF-8, throwing if missing. */
|
|
4
|
+
readonly readFile: (path: string) => string;
|
|
5
|
+
/** Write UTF-8 content to a file (creates if missing, overwrites if exists). */
|
|
6
|
+
readonly writeFile: (path: string, content: string) => void;
|
|
7
|
+
/** Atomically rename a file. */
|
|
8
|
+
readonly rename: (from: string, to: string) => void;
|
|
9
|
+
/** Create directory recursively. */
|
|
10
|
+
readonly mkdir: (path: string) => void;
|
|
11
|
+
};
|
|
12
|
+
/** Quality metrics for a single ticket. */
|
|
13
|
+
type QualityEntry = {
|
|
14
|
+
readonly reworkCycles: number;
|
|
15
|
+
readonly verificationRetries: number;
|
|
16
|
+
readonly deliveredAt?: string;
|
|
17
|
+
readonly duration?: number;
|
|
18
|
+
};
|
|
19
|
+
/** Aggregate quality summary across all tracked tickets. */
|
|
20
|
+
type QualitySummary = {
|
|
21
|
+
readonly totalTickets: number;
|
|
22
|
+
readonly avgReworkCycles: number;
|
|
23
|
+
readonly avgVerificationRetries: number;
|
|
24
|
+
readonly avgDuration: number;
|
|
25
|
+
};
|
|
26
|
+
/** Options for recording a verification retry. */
|
|
27
|
+
type VerificationRetryOpts = {
|
|
28
|
+
readonly ticketKey: string;
|
|
29
|
+
readonly retries: number;
|
|
30
|
+
};
|
|
31
|
+
/** Options for recording a delivery. */
|
|
32
|
+
type DeliveryOpts = {
|
|
33
|
+
readonly ticketKey: string;
|
|
34
|
+
readonly duration: number;
|
|
35
|
+
readonly now: number;
|
|
36
|
+
};
|
|
37
|
+
/** Quality data persisted to `.clancy/quality.json`. */
|
|
38
|
+
type QualityData = {
|
|
39
|
+
readonly tickets: Record<string, QualityEntry>;
|
|
40
|
+
readonly summary: QualitySummary;
|
|
41
|
+
};
|
|
42
|
+
/**
|
|
43
|
+
* Read quality data from `.clancy/quality.json`.
|
|
44
|
+
*
|
|
45
|
+
* Returns empty data if the file is missing, corrupt, or structurally invalid.
|
|
46
|
+
* Summary is always recomputed from ticket entries to guard against stale data.
|
|
47
|
+
*
|
|
48
|
+
* @param fs - Injected filesystem operations.
|
|
49
|
+
* @param projectRoot - Absolute path to the project root.
|
|
50
|
+
* @returns The quality data.
|
|
51
|
+
*/
|
|
52
|
+
export declare function readQualityData(fs: QualityFs, projectRoot: string): QualityData;
|
|
53
|
+
/**
|
|
54
|
+
* Record a rework cycle for a ticket.
|
|
55
|
+
*
|
|
56
|
+
* Increments the rework counter. Best-effort — filesystem errors are
|
|
57
|
+
* swallowed to avoid crashing the orchestrator.
|
|
58
|
+
*
|
|
59
|
+
* @param fs - Injected filesystem operations.
|
|
60
|
+
* @param projectRoot - Absolute path to the project root.
|
|
61
|
+
* @param ticketKey - The ticket identifier.
|
|
62
|
+
* @returns Nothing.
|
|
63
|
+
*/
|
|
64
|
+
export declare function recordRework(fs: QualityFs, projectRoot: string, ticketKey: string): void;
|
|
65
|
+
/**
|
|
66
|
+
* Record verification retries for a ticket.
|
|
67
|
+
*
|
|
68
|
+
* Sets the verification retry count. Best-effort — filesystem errors are
|
|
69
|
+
* swallowed to avoid crashing the orchestrator.
|
|
70
|
+
*
|
|
71
|
+
* @param fs - Injected filesystem operations.
|
|
72
|
+
* @param projectRoot - Absolute path to the project root.
|
|
73
|
+
* @param opts - Verification retry options (ticket key, retry count).
|
|
74
|
+
* @returns Nothing.
|
|
75
|
+
*/
|
|
76
|
+
export declare function recordVerificationRetry(fs: QualityFs, projectRoot: string, opts: VerificationRetryOpts): void;
|
|
77
|
+
/**
|
|
78
|
+
* Record successful delivery of a ticket.
|
|
79
|
+
*
|
|
80
|
+
* Sets the delivery timestamp (from injected `now`) and duration.
|
|
81
|
+
* Best-effort — filesystem errors are swallowed to avoid crashing
|
|
82
|
+
* the orchestrator.
|
|
83
|
+
*
|
|
84
|
+
* @param fs - Injected filesystem operations.
|
|
85
|
+
* @param projectRoot - Absolute path to the project root.
|
|
86
|
+
* @param opts - Delivery options (ticket key, duration, timestamp).
|
|
87
|
+
* @returns Nothing.
|
|
88
|
+
*/
|
|
89
|
+
export declare function recordDelivery(fs: QualityFs, projectRoot: string, opts: DeliveryOpts): void;
|
|
90
|
+
/**
|
|
91
|
+
* Read quality data for reporting.
|
|
92
|
+
*
|
|
93
|
+
* @param fs - Injected filesystem operations.
|
|
94
|
+
* @param projectRoot - Absolute path to the project root.
|
|
95
|
+
* @returns The quality data, or `undefined` if no tickets have been tracked.
|
|
96
|
+
*/
|
|
97
|
+
export declare function getQualityData(fs: QualityFs, projectRoot: string): QualityData | undefined;
|
|
98
|
+
export {};
|
|
99
|
+
//# sourceMappingURL=quality.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"quality.d.ts","sourceRoot":"","sources":["../../../../src/dev/lifecycle/quality/quality.ts"],"names":[],"mappings":"AAWA,2DAA2D;AAC3D,MAAM,MAAM,SAAS,GAAG;IACtB,iDAAiD;IACjD,QAAQ,CAAC,QAAQ,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,CAAC;IAC5C,gFAAgF;IAChF,QAAQ,CAAC,SAAS,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;IAC5D,gCAAgC;IAChC,QAAQ,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IACpD,oCAAoC;IACpC,QAAQ,CAAC,KAAK,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;CACxC,CAAC;AAEF,2CAA2C;AAC3C,KAAK,YAAY,GAAG;IAClB,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,mBAAmB,EAAE,MAAM,CAAC;IACrC,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,QAAQ,CAAC,EAA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