@sentry/craft 3.1.0 → 3.2.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/README.md +22 -111
- package/dist/craft +116 -15
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -11,38 +11,19 @@
|
|
|
11
11
|
|
|
12
12
|
Craft is a command line tool that helps automate and pipeline package releases. It enforces a specific workflow for managing release branches, changelogs, and artifact publishing.
|
|
13
13
|
|
|
14
|
-
📚 **[Full Documentation](https://
|
|
14
|
+
📚 **[Full Documentation](https://craft.sentry.dev/)**
|
|
15
15
|
|
|
16
16
|
## Quick Start
|
|
17
17
|
|
|
18
18
|
### Installation
|
|
19
19
|
|
|
20
|
-
Download a standalone executable for your OS and architecture from the
|
|
21
|
-
[latest release](https://github.com/getsentry/craft/releases/latest), or install
|
|
22
|
-
the portable JavaScript package via npm. Standalone executables embed Node;
|
|
23
|
-
npm installation requires Node. The legacy `craft` asset remains a JavaScript bundle.
|
|
24
|
-
|
|
25
|
-
```shell
|
|
26
|
-
npm install -g @sentry/craft
|
|
27
|
-
```
|
|
28
|
-
|
|
29
|
-
Homebrew installation will be available after the first stable release publishing
|
|
30
|
-
these binaries and its formula:
|
|
31
|
-
|
|
32
|
-
```shell
|
|
33
|
-
brew install getsentry/tools/craft
|
|
34
|
-
```
|
|
35
|
-
|
|
36
|
-
Once the first native release and installer website are published:
|
|
37
|
-
|
|
38
20
|
```shell
|
|
39
21
|
curl -fsSL https://craft.sentry.dev/install | bash
|
|
40
22
|
```
|
|
41
23
|
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
and running the script locally.
|
|
24
|
+
Homebrew (`brew install getsentry/tools/craft`), standalone binaries, and npm
|
|
25
|
+
(`npm install -g @sentry/craft`) are also available. See
|
|
26
|
+
[Installation](https://craft.sentry.dev/installation/).
|
|
46
27
|
|
|
47
28
|
### Usage
|
|
48
29
|
|
|
@@ -57,22 +38,24 @@ craft prepare 1.2.3
|
|
|
57
38
|
craft publish 1.2.3
|
|
58
39
|
```
|
|
59
40
|
|
|
41
|
+
See the [Quick Start](https://craft.sentry.dev/getting-started/) to set up a project.
|
|
42
|
+
|
|
60
43
|
## Features
|
|
61
44
|
|
|
62
|
-
- **Auto Versioning** -
|
|
63
|
-
- **Multiple Targets** - Publish to GitHub,
|
|
64
|
-
- **Changelog Management** - Auto-generate changelogs from
|
|
65
|
-
- **AI Changelog Summaries** -
|
|
66
|
-
- **
|
|
67
|
-
- **CI Integration** - Wait for CI to pass, download artifacts, and publish
|
|
68
|
-
- **GitHub Actions** -
|
|
45
|
+
- **[Auto Versioning](https://craft.sentry.dev/versioning/)** - Determine version bumps from conventional commits, or use CalVer
|
|
46
|
+
- **[Multiple Targets](https://craft.sentry.dev/targets/)** - Publish to GitHub, npm, PyPI, Docker, crates.io, NuGet, and more
|
|
47
|
+
- **[Changelog Management](https://craft.sentry.dev/changelogs/)** - Auto-generate changelogs from pull requests or validate manual entries
|
|
48
|
+
- **[AI Changelog Summaries](https://craft.sentry.dev/ai-summaries/)** - Optional release, category, and scope summaries on top of generated changelogs
|
|
49
|
+
- **[Monorepo Support](https://craft.sentry.dev/workspaces/)** - Release independently versioned products from one repository with release workspaces
|
|
50
|
+
- **[CI Integration](https://craft.sentry.dev/release-workflow/)** - Wait for CI to pass, download artifacts, and publish
|
|
51
|
+
- **[GitHub Actions](https://craft.sentry.dev/github-actions/)** - Reusable workflows for releases and changelog previews
|
|
69
52
|
|
|
70
53
|
## Configuration
|
|
71
54
|
|
|
72
55
|
Create a `.craft.yml` in your project root:
|
|
73
56
|
|
|
74
57
|
```yaml
|
|
75
|
-
minVersion: '2.
|
|
58
|
+
minVersion: '2.21.0'
|
|
76
59
|
changelog:
|
|
77
60
|
policy: auto
|
|
78
61
|
targets:
|
|
@@ -81,39 +64,10 @@ targets:
|
|
|
81
64
|
access: public
|
|
82
65
|
```
|
|
83
66
|
|
|
84
|
-
See the [configuration reference](https://
|
|
85
|
-
|
|
86
|
-
## Supported Targets
|
|
87
|
-
|
|
88
|
-
| Target | Description |
|
|
89
|
-
| ------------------ | ------------------------------------- |
|
|
90
|
-
| `github` | GitHub releases and tags |
|
|
91
|
-
| `npm` | NPM registry (with workspace support) |
|
|
92
|
-
| `pypi` | Python Package Index |
|
|
93
|
-
| `crates` | Rust crates.io |
|
|
94
|
-
| `nuget` | .NET NuGet |
|
|
95
|
-
| `docker` | Docker registries |
|
|
96
|
-
| `brew` | Homebrew formulas |
|
|
97
|
-
| `gcs` | Google Cloud Storage |
|
|
98
|
-
| `gh-pages` | GitHub Pages |
|
|
99
|
-
| `cocoapods` | CocoaPods |
|
|
100
|
-
| `gem` | RubyGems |
|
|
101
|
-
| `maven` | Maven Central |
|
|
102
|
-
| `hex` | Elixir Hex |
|
|
103
|
-
| `pub-dev` | Dart/Flutter pub.dev |
|
|
104
|
-
| `aws-lambda-layer` | AWS Lambda layers |
|
|
105
|
-
| `powershell` | PowerShell Gallery |
|
|
106
|
-
|
|
107
|
-
See the [targets documentation](https://getsentry.github.io/craft/targets/) for configuration details.
|
|
67
|
+
See the [configuration reference](https://craft.sentry.dev/configuration/) for all options.
|
|
108
68
|
|
|
109
69
|
## GitHub Actions
|
|
110
70
|
|
|
111
|
-
Craft provides GitHub Actions for automating releases and previewing changelog entries.
|
|
112
|
-
|
|
113
|
-
### Prepare Release Action
|
|
114
|
-
|
|
115
|
-
Automates the `craft prepare` workflow in GitHub Actions:
|
|
116
|
-
|
|
117
71
|
```yaml
|
|
118
72
|
name: Release
|
|
119
73
|
on:
|
|
@@ -125,59 +79,16 @@ on:
|
|
|
125
79
|
|
|
126
80
|
jobs:
|
|
127
81
|
release:
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
- uses: getsentry/craft@v2
|
|
134
|
-
with:
|
|
135
|
-
version: ${{ github.event.inputs.version }}
|
|
136
|
-
env:
|
|
137
|
-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
138
|
-
```
|
|
139
|
-
|
|
140
|
-
**Inputs:**
|
|
141
|
-
|
|
142
|
-
| Input | Description | Default |
|
|
143
|
-
| --------------- | --------------------------------------------------------------------------------------------- | ------------------------------------ |
|
|
144
|
-
| `version` | Version to release (semver, "auto", "major", "minor", "patch") | Uses `versioning.policy` from config |
|
|
145
|
-
| `merge_target` | Target branch to merge into | Default branch |
|
|
146
|
-
| `force` | Force release even with blockers | `false` |
|
|
147
|
-
| `blocker_label` | Label that blocks releases | `release-blocker` |
|
|
148
|
-
| `publish_repo` | Repository for publish issues. Use `"self"` to create issues in the source repository itself. | `{owner}/publish` |
|
|
149
|
-
|
|
150
|
-
**Outputs:**
|
|
151
|
-
|
|
152
|
-
| Output | Description |
|
|
153
|
-
| ----------- | ------------------------------------ |
|
|
154
|
-
| `version` | The resolved version being released |
|
|
155
|
-
| `branch` | The release branch name |
|
|
156
|
-
| `sha` | The commit SHA on the release branch |
|
|
157
|
-
| `changelog` | The changelog for this release |
|
|
158
|
-
|
|
159
|
-
### Changelog Preview (Reusable Workflow)
|
|
160
|
-
|
|
161
|
-
Posts a preview comment on PRs showing how they'll appear in the changelog:
|
|
162
|
-
|
|
163
|
-
```yaml
|
|
164
|
-
name: Changelog Preview
|
|
165
|
-
on:
|
|
166
|
-
pull_request:
|
|
167
|
-
types: [opened, synchronize, reopened, edited, labeled]
|
|
168
|
-
|
|
169
|
-
jobs:
|
|
170
|
-
changelog-preview:
|
|
171
|
-
uses: getsentry/craft/.github/workflows/changelog-preview.yml@v2
|
|
82
|
+
permissions:
|
|
83
|
+
contents: write
|
|
84
|
+
uses: getsentry/craft/.github/workflows/release.yml@v2
|
|
85
|
+
with:
|
|
86
|
+
version: ${{ inputs.version }}
|
|
172
87
|
secrets: inherit
|
|
173
88
|
```
|
|
174
89
|
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
- Generate the upcoming changelog including the PR's changes
|
|
178
|
-
- Highlight entries from the PR using blockquote style (left border)
|
|
179
|
-
- Post a comment on the PR with the preview
|
|
180
|
-
- Automatically update when you update the PR (push, edit title/description, or change labels)
|
|
90
|
+
See [GitHub Actions](https://craft.sentry.dev/github-actions/) for all inputs,
|
|
91
|
+
the composite action, and the changelog preview workflow.
|
|
181
92
|
|
|
182
93
|
## Contributing
|
|
183
94
|
|
package/dist/craft
CHANGED
|
@@ -121297,11 +121297,44 @@ async function fetchPRInfo(prNumber) {
|
|
|
121297
121297
|
title: pr3.title,
|
|
121298
121298
|
body: pr3.body ?? "",
|
|
121299
121299
|
author: pr3.user?.login ?? "",
|
|
121300
|
+
authorIsBot: pr3.user?.type === "Bot",
|
|
121300
121301
|
labels: labels.map((l8) => l8.name),
|
|
121301
121302
|
baseRef: pr3.base.ref,
|
|
121302
121303
|
headSha: pr3.head.sha
|
|
121303
121304
|
};
|
|
121304
121305
|
}
|
|
121306
|
+
function authorLogins(nodes = []) {
|
|
121307
|
+
return nodes.map((node3) => node3.user?.login).filter((login) => Boolean(login));
|
|
121308
|
+
}
|
|
121309
|
+
async function fetchPRCoAuthors(prNumber) {
|
|
121310
|
+
const { repo, owner } = await getGlobalGitHubConfig();
|
|
121311
|
+
try {
|
|
121312
|
+
const response = await getGitHubClient().graphql(
|
|
121313
|
+
`query($owner: String!, $repo: String!, $number: Int!) {
|
|
121314
|
+
repository(owner: $owner, name: $repo) {
|
|
121315
|
+
pullRequest(number: $number) {
|
|
121316
|
+
commits(first: ${MAX_PR_COMMITS}) {
|
|
121317
|
+
nodes {
|
|
121318
|
+
commit {
|
|
121319
|
+
authors(first: ${MAX_COMMIT_AUTHORS}) { nodes { user { login } } }
|
|
121320
|
+
}
|
|
121321
|
+
}
|
|
121322
|
+
}
|
|
121323
|
+
}
|
|
121324
|
+
}
|
|
121325
|
+
}`,
|
|
121326
|
+
{ owner, repo, number: prNumber }
|
|
121327
|
+
);
|
|
121328
|
+
return (response?.repository?.pullRequest?.commits.nodes ?? []).flatMap(
|
|
121329
|
+
(node3) => authorLogins(node3.commit.authors.nodes)
|
|
121330
|
+
);
|
|
121331
|
+
} catch (error3) {
|
|
121332
|
+
logger.warn(
|
|
121333
|
+
`Failed to fetch co-authors for PR #${prNumber}: ${error3.message || error3}`
|
|
121334
|
+
);
|
|
121335
|
+
return [];
|
|
121336
|
+
}
|
|
121337
|
+
}
|
|
121305
121338
|
function isBumpType(value) {
|
|
121306
121339
|
return BUMP_TYPES.has(value);
|
|
121307
121340
|
}
|
|
@@ -121540,12 +121573,37 @@ ${body}
|
|
|
121540
121573
|
const startIdx = firstHeading?.startIndex ?? markdown.length;
|
|
121541
121574
|
return markdown.slice(0, startIdx) + newSection + markdown.slice(startIdx);
|
|
121542
121575
|
}
|
|
121576
|
+
function authorKey(login) {
|
|
121577
|
+
return login.toLowerCase().replace(/\[bot\]$/, "");
|
|
121578
|
+
}
|
|
121579
|
+
function creditAuthors(author, authorIsBot = false, coAuthors = []) {
|
|
121580
|
+
const hidden = getNormalizedReleaseConfig()?.changelog.hideAuthors ?? /* @__PURE__ */ new Set();
|
|
121581
|
+
const seen = /* @__PURE__ */ new Set();
|
|
121582
|
+
const credits = { people: [], bots: [] };
|
|
121583
|
+
for (const login of [author, ...coAuthors]) {
|
|
121584
|
+
if (!login) {
|
|
121585
|
+
continue;
|
|
121586
|
+
}
|
|
121587
|
+
const key = authorKey(login);
|
|
121588
|
+
if (seen.has(key) || hidden.has(key)) {
|
|
121589
|
+
continue;
|
|
121590
|
+
}
|
|
121591
|
+
seen.add(key);
|
|
121592
|
+
if (login === author && authorIsBot || /\[bot\]$/i.test(login)) {
|
|
121593
|
+
credits.bots.push(login.replace(/\[bot\]$/i, ""));
|
|
121594
|
+
} else {
|
|
121595
|
+
credits.people.push(login);
|
|
121596
|
+
}
|
|
121597
|
+
}
|
|
121598
|
+
return credits;
|
|
121599
|
+
}
|
|
121543
121600
|
function createPREntriesFromRaw(raw, defaultTitle, important = false) {
|
|
121544
121601
|
const importantTitle = important || isImportantChangelogText(defaultTitle) ? defaultTitle : void 0;
|
|
121545
121602
|
const customEntries = extractChangelogEntry(raw.prBody);
|
|
121603
|
+
const credits = creditAuthors(raw.author, raw.authorIsBot, raw.coAuthors);
|
|
121546
121604
|
if (customEntries) {
|
|
121547
121605
|
return customEntries.map((entry) => ({
|
|
121548
|
-
|
|
121606
|
+
credits,
|
|
121549
121607
|
number: raw.pr ?? "",
|
|
121550
121608
|
hash: raw.hash,
|
|
121551
121609
|
body: entry.nestedContent ?? "",
|
|
@@ -121556,7 +121614,7 @@ function createPREntriesFromRaw(raw, defaultTitle, important = false) {
|
|
|
121556
121614
|
}
|
|
121557
121615
|
return [
|
|
121558
121616
|
{
|
|
121559
|
-
|
|
121617
|
+
credits,
|
|
121560
121618
|
number: raw.pr ?? "",
|
|
121561
121619
|
hash: raw.hash,
|
|
121562
121620
|
body: "",
|
|
@@ -121656,6 +121714,9 @@ function normalizeReleaseConfig(config) {
|
|
|
121656
121714
|
labels: /* @__PURE__ */ new Set(),
|
|
121657
121715
|
authors: /* @__PURE__ */ new Set()
|
|
121658
121716
|
},
|
|
121717
|
+
hideAuthors: new Set(
|
|
121718
|
+
(config.changelog.hide_authors ?? []).map(authorKey)
|
|
121719
|
+
),
|
|
121659
121720
|
categories: []
|
|
121660
121721
|
}
|
|
121661
121722
|
};
|
|
@@ -121721,7 +121782,7 @@ function getNormalizedReleaseConfig() {
|
|
|
121721
121782
|
const categoriesWithoutSemver = normalized.changelog.categories.filter((cat) => !cat.semver).map((cat) => cat.title);
|
|
121722
121783
|
if (categoriesWithoutSemver.length > 0) {
|
|
121723
121784
|
logger.warn(
|
|
121724
|
-
`The following changelog categories have no 'semver' field and won't contribute to version bump detection: ${categoriesWithoutSemver.map((t6) => `"${t6}"`).join(", ")}. See: https://
|
|
121785
|
+
`The following changelog categories have no 'semver' field and won't contribute to version bump detection: ${categoriesWithoutSemver.map((t6) => `"${t6}"`).join(", ")}. See: https://craft.sentry.dev/changelogs/#categories`
|
|
121725
121786
|
);
|
|
121726
121787
|
}
|
|
121727
121788
|
}
|
|
@@ -121839,7 +121900,19 @@ function formatChangelogEntry(entry, disableMentions = false, disablePRLinks = f
|
|
|
121839
121900
|
}
|
|
121840
121901
|
title = escapeLeadingUnderscores(title);
|
|
121841
121902
|
let text = `- ${title}`;
|
|
121842
|
-
const
|
|
121903
|
+
const formatAuthors = (authors) => {
|
|
121904
|
+
const refs = authors.map(
|
|
121905
|
+
(author) => disableMentions ? `**${author}**` : `@${author}`
|
|
121906
|
+
);
|
|
121907
|
+
const shown = refs.length > MAX_CREDITED_AUTHORS ? [
|
|
121908
|
+
...refs.slice(0, MAX_CREDITED_AUTHORS - 1),
|
|
121909
|
+
`${refs.length - MAX_CREDITED_AUTHORS + 1} others`
|
|
121910
|
+
] : refs;
|
|
121911
|
+
return shown.length > 1 ? `${shown.slice(0, -1).join(", ")} and ${shown.at(-1)}` : shown[0];
|
|
121912
|
+
};
|
|
121913
|
+
const peopleRef = formatAuthors(entry.credits.people);
|
|
121914
|
+
const botsRef = formatAuthors(entry.credits.bots);
|
|
121915
|
+
const authorRef = peopleRef && botsRef ? `${peopleRef} with ${botsRef}` : peopleRef || botsRef;
|
|
121843
121916
|
if (entry.prNumber) {
|
|
121844
121917
|
const prRef = disablePRLinks ? `\`#${entry.prNumber}\`` : `[#${entry.prNumber}](${entry.repoUrl}/pull/${entry.prNumber})`;
|
|
121845
121918
|
if (authorRef) {
|
|
@@ -121911,6 +121984,8 @@ async function generateChangelogWithHighlight(git, rev, currentPRNumber) {
|
|
|
121911
121984
|
title: prInfo.title.trim(),
|
|
121912
121985
|
body: prInfo.body,
|
|
121913
121986
|
author: prInfo.author,
|
|
121987
|
+
authorIsBot: prInfo.authorIsBot,
|
|
121988
|
+
coAuthors: await fetchPRCoAuthors(currentPRNumber),
|
|
121914
121989
|
pr: currentPRStr,
|
|
121915
121990
|
prTitle: prInfo.title,
|
|
121916
121991
|
prBody: prInfo.body,
|
|
@@ -121948,25 +122023,35 @@ async function fetchRawCommitInfo(git, rev, until) {
|
|
|
121948
122023
|
const githubCommits = await getPRAndLabelsFromCommit(
|
|
121949
122024
|
gitCommits.map(({ hash }) => hash)
|
|
121950
122025
|
);
|
|
121951
|
-
const seenPRs = /* @__PURE__ */ new
|
|
122026
|
+
const seenPRs = /* @__PURE__ */ new Map();
|
|
121952
122027
|
const result = [];
|
|
121953
122028
|
for (const gitCommit of gitCommits) {
|
|
121954
122029
|
const githubCommit = githubCommits[gitCommit.hash];
|
|
121955
122030
|
const pr3 = githubCommit?.pr ?? gitCommit.pr ?? void 0;
|
|
121956
|
-
|
|
121957
|
-
|
|
121958
|
-
|
|
122031
|
+
const seen = pr3 ? seenPRs.get(pr3) : void 0;
|
|
122032
|
+
if (seen) {
|
|
122033
|
+
seen.coAuthors = [
|
|
122034
|
+
...seen.coAuthors ?? [],
|
|
122035
|
+
...githubCommit?.coAuthors ?? []
|
|
122036
|
+
];
|
|
122037
|
+
continue;
|
|
121959
122038
|
}
|
|
121960
|
-
|
|
122039
|
+
const commit = {
|
|
121961
122040
|
hash: gitCommit.hash,
|
|
121962
122041
|
title: gitCommit.title,
|
|
121963
122042
|
body: gitCommit.body,
|
|
121964
122043
|
author: githubCommit?.author,
|
|
122044
|
+
authorIsBot: githubCommit?.authorIsBot,
|
|
122045
|
+
coAuthors: githubCommit?.coAuthors,
|
|
121965
122046
|
pr: pr3,
|
|
121966
122047
|
prTitle: githubCommit?.prTitle ?? void 0,
|
|
121967
122048
|
prBody: githubCommit?.prBody ?? void 0,
|
|
121968
122049
|
labels: githubCommit?.labels ?? []
|
|
121969
|
-
}
|
|
122050
|
+
};
|
|
122051
|
+
if (pr3) {
|
|
122052
|
+
seenPRs.set(pr3, commit);
|
|
122053
|
+
}
|
|
122054
|
+
result.push(commit);
|
|
121970
122055
|
}
|
|
121971
122056
|
return result;
|
|
121972
122057
|
}
|
|
@@ -122006,6 +122091,8 @@ function categorizeCommits(rawCommits) {
|
|
|
122006
122091
|
if (!categoryTitle) {
|
|
122007
122092
|
leftovers.push({
|
|
122008
122093
|
author: raw.author,
|
|
122094
|
+
authorIsBot: raw.authorIsBot,
|
|
122095
|
+
coAuthors: raw.coAuthors,
|
|
122009
122096
|
hash: raw.hash,
|
|
122010
122097
|
title: raw.title,
|
|
122011
122098
|
body: raw.body,
|
|
@@ -122163,7 +122250,7 @@ async function serializeChangelog(rawData, maxLeftovers, disableMentions = false
|
|
|
122163
122250
|
(pr3) => formatChangelogEntry(
|
|
122164
122251
|
{
|
|
122165
122252
|
title: stripTitle(pr3.title, pr3.matchedPattern, !showsScopeHeader),
|
|
122166
|
-
|
|
122253
|
+
credits: pr3.credits,
|
|
122167
122254
|
prNumber: pr3.number,
|
|
122168
122255
|
hash: pr3.hash,
|
|
122169
122256
|
body: pr3.body,
|
|
@@ -122198,6 +122285,8 @@ async function serializeChangelog(rawData, maxLeftovers, disableMentions = false
|
|
|
122198
122285
|
const prEntries = createPREntriesFromRaw(
|
|
122199
122286
|
{
|
|
122200
122287
|
author: commit.author,
|
|
122288
|
+
authorIsBot: commit.authorIsBot,
|
|
122289
|
+
coAuthors: commit.coAuthors,
|
|
122201
122290
|
pr: commit.pr ?? void 0,
|
|
122202
122291
|
hash: commit.hash,
|
|
122203
122292
|
prBody: commit.prBody,
|
|
@@ -122211,7 +122300,7 @@ async function serializeChangelog(rawData, maxLeftovers, disableMentions = false
|
|
|
122211
122300
|
formatChangelogEntry(
|
|
122212
122301
|
{
|
|
122213
122302
|
title: pr3.title,
|
|
122214
|
-
|
|
122303
|
+
credits: pr3.credits,
|
|
122215
122304
|
prNumber: pr3.number || void 0,
|
|
122216
122305
|
hash: pr3.hash,
|
|
122217
122306
|
repoUrl,
|
|
@@ -122305,9 +122394,14 @@ async function getPRAndLabelsFromCommit(hashes) {
|
|
|
122305
122394
|
author {
|
|
122306
122395
|
user { login }
|
|
122307
122396
|
}
|
|
122397
|
+
authors(first: ${MAX_COMMIT_AUTHORS}) {
|
|
122398
|
+
nodes { user { login } }
|
|
122399
|
+
}
|
|
122308
122400
|
associatedPullRequests(first: 1) {
|
|
122309
122401
|
nodes {
|
|
122310
122402
|
author {
|
|
122403
|
+
# Identifies bots, whose PR author login lacks the [bot] suffix
|
|
122404
|
+
__typename
|
|
122311
122405
|
login
|
|
122312
122406
|
}
|
|
122313
122407
|
number
|
|
@@ -122357,17 +122451,21 @@ async function getPRAndLabelsFromCommit(hashes) {
|
|
|
122357
122451
|
return Object.fromEntries(
|
|
122358
122452
|
Object.entries(commitInfo).map(([hash, commit]) => {
|
|
122359
122453
|
const pr3 = commit?.associatedPullRequests.nodes[0];
|
|
122454
|
+
const coAuthors = authorLogins(commit?.authors?.nodes.slice(1));
|
|
122360
122455
|
return [
|
|
122361
122456
|
// Strip the prefix on the hash we used to workaround in GraphQL
|
|
122362
122457
|
hash.slice(1),
|
|
122363
122458
|
pr3 ? {
|
|
122364
122459
|
author: pr3.author?.login,
|
|
122460
|
+
authorIsBot: pr3.author?.__typename === "Bot",
|
|
122461
|
+
coAuthors,
|
|
122365
122462
|
pr: pr3.number,
|
|
122366
122463
|
prTitle: pr3.title,
|
|
122367
122464
|
prBody: pr3.body,
|
|
122368
122465
|
labels: pr3.labels?.nodes?.map((label) => label.name) ?? []
|
|
122369
122466
|
} : {
|
|
122370
122467
|
author: commit?.author.user?.login,
|
|
122468
|
+
coAuthors,
|
|
122371
122469
|
pr: null,
|
|
122372
122470
|
prTitle: null,
|
|
122373
122471
|
prBody: null,
|
|
@@ -122377,7 +122475,7 @@ async function getPRAndLabelsFromCommit(hashes) {
|
|
|
122377
122475
|
})
|
|
122378
122476
|
);
|
|
122379
122477
|
}
|
|
122380
|
-
var import_fs12, import_path12, BUMP_TYPES, DEFAULT_CHANGELOG_PATH, DEFAULT_UNRELEASED_TITLE, SKIP_CHANGELOG_MAGIC_WORD, DEFAULT_CHANGESET_BODY, VERSION_HEADER_LEVEL, SUBSECTION_HEADER_LEVEL, SCOPE_HEADER_LEVEL, MAX_COMMITS_PER_QUERY, MAX_LEFTOVERS, DEFAULT_RELEASE_CONFIG, releaseConfigCache, SHORT_SHA_LENGTH, changesetCache, rawChangesetCache;
|
|
122478
|
+
var import_fs12, import_path12, BUMP_TYPES, DEFAULT_CHANGELOG_PATH, DEFAULT_UNRELEASED_TITLE, SKIP_CHANGELOG_MAGIC_WORD, DEFAULT_CHANGESET_BODY, VERSION_HEADER_LEVEL, SUBSECTION_HEADER_LEVEL, SCOPE_HEADER_LEVEL, MAX_COMMITS_PER_QUERY, MAX_PR_COMMITS, MAX_COMMIT_AUTHORS, MAX_CREDITED_AUTHORS, MAX_LEFTOVERS, DEFAULT_RELEASE_CONFIG, releaseConfigCache, SHORT_SHA_LENGTH, changesetCache, rawChangesetCache;
|
|
122381
122479
|
var init_changelog = __esm({
|
|
122382
122480
|
"src/utils/changelog.ts"() {
|
|
122383
122481
|
"use strict";
|
|
@@ -122406,6 +122504,9 @@ var init_changelog = __esm({
|
|
|
122406
122504
|
SUBSECTION_HEADER_LEVEL = VERSION_HEADER_LEVEL + 1;
|
|
122407
122505
|
SCOPE_HEADER_LEVEL = SUBSECTION_HEADER_LEVEL + 1;
|
|
122408
122506
|
MAX_COMMITS_PER_QUERY = 50;
|
|
122507
|
+
MAX_PR_COMMITS = 100;
|
|
122508
|
+
MAX_COMMIT_AUTHORS = 10;
|
|
122509
|
+
MAX_CREDITED_AUTHORS = 3;
|
|
122409
122510
|
MAX_LEFTOVERS = 24;
|
|
122410
122511
|
if (SUBSECTION_HEADER_LEVEL <= VERSION_HEADER_LEVEL) {
|
|
122411
122512
|
throw new Error("Subsection headers should nest under version headers!");
|
|
@@ -229644,7 +229745,7 @@ var require_package7 = __commonJS({
|
|
|
229644
229745
|
"package.json"(exports2, module2) {
|
|
229645
229746
|
module2.exports = {
|
|
229646
229747
|
name: "@sentry/craft",
|
|
229647
|
-
version: "3.
|
|
229748
|
+
version: "3.2.0",
|
|
229648
229749
|
description: "The universal sentry workflow CLI",
|
|
229649
229750
|
main: "dist/craft",
|
|
229650
229751
|
repository: "https://github.com/getsentry/craft",
|
|
@@ -229851,7 +229952,7 @@ function getPackage() {
|
|
|
229851
229952
|
}
|
|
229852
229953
|
function getPackageVersion3() {
|
|
229853
229954
|
const { version: version2 } = getPackage();
|
|
229854
|
-
const buildInfo = "
|
|
229955
|
+
const buildInfo = "439259d80235250856fefffa4b47447f9b97f82f";
|
|
229855
229956
|
return buildInfo ? `${version2} (${buildInfo})` : version2;
|
|
229856
229957
|
}
|
|
229857
229958
|
function semVerToString(s8) {
|