@bragduck/cli 2.13.0 → 2.13.1
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/dist/bin/bragduck.js +10 -10
- package/dist/bin/bragduck.js.map +1 -1
- package/package.json +1 -1
package/dist/bin/bragduck.js
CHANGED
|
@@ -3859,24 +3859,24 @@ var ConfluenceService = class {
|
|
|
3859
3859
|
if (page.history?.createdBy?.email === userEmail) {
|
|
3860
3860
|
return {
|
|
3861
3861
|
type: "created",
|
|
3862
|
-
details: `Created page with ${page.version
|
|
3862
|
+
details: `Created page with ${page.version?.number || 1} version${(page.version?.number || 1) > 1 ? "s" : ""}`
|
|
3863
3863
|
};
|
|
3864
3864
|
}
|
|
3865
|
-
const hasEdits = page.version
|
|
3865
|
+
const hasEdits = page.version?.by?.email === userEmail && (page.version?.number || 0) > 1;
|
|
3866
3866
|
const userComments = page.children?.comment?.results?.filter(
|
|
3867
|
-
(comment) => comment.version
|
|
3867
|
+
(comment) => comment.version?.by?.email === userEmail
|
|
3868
3868
|
) || [];
|
|
3869
3869
|
const hasComments = userComments.length > 0;
|
|
3870
3870
|
if (hasEdits && hasComments) {
|
|
3871
3871
|
return {
|
|
3872
3872
|
type: "edited",
|
|
3873
|
-
details: `Edited page (v${page.version
|
|
3873
|
+
details: `Edited page (v${page.version?.number || 1}) and added ${userComments.length} comment${userComments.length > 1 ? "s" : ""}`
|
|
3874
3874
|
};
|
|
3875
3875
|
}
|
|
3876
3876
|
if (hasEdits) {
|
|
3877
3877
|
return {
|
|
3878
3878
|
type: "edited",
|
|
3879
|
-
details: `Edited page to version ${page.version
|
|
3879
|
+
details: `Edited page to version ${page.version?.number || 1}`
|
|
3880
3880
|
};
|
|
3881
3881
|
}
|
|
3882
3882
|
if (hasComments) {
|
|
@@ -4040,11 +4040,11 @@ var ConfluenceService = class {
|
|
|
4040
4040
|
message = `${contributionPrefix}${page.title}
|
|
4041
4041
|
|
|
4042
4042
|
${contribution.details}
|
|
4043
|
-
[Confluence Page v${page.version
|
|
4043
|
+
[Confluence Page v${page.version?.number || 1}]`;
|
|
4044
4044
|
} else {
|
|
4045
4045
|
message = `${page.title}
|
|
4046
4046
|
|
|
4047
|
-
[Confluence Page v${page.version
|
|
4047
|
+
[Confluence Page v${page.version?.number || 1}]`;
|
|
4048
4048
|
}
|
|
4049
4049
|
let baseUrl = "https://confluence.atlassian.net";
|
|
4050
4050
|
if (instanceUrl) {
|
|
@@ -4061,9 +4061,9 @@ ${contribution.details}
|
|
|
4061
4061
|
const url = `${baseUrl}/wiki${page._links.webui}`;
|
|
4062
4062
|
const baseSize = this.estimatePageSize(page);
|
|
4063
4063
|
const impactScore = contribution ? this.calculateContributionImpact(contribution.type, baseSize) : baseSize;
|
|
4064
|
-
const author = page.history?.createdBy?.displayName || page.version
|
|
4065
|
-
const authorEmail = page.history?.createdBy?.email || page.version
|
|
4066
|
-
const date = contribution?.type === "created" ? page.history?.createdDate || page.version
|
|
4064
|
+
const author = page.history?.createdBy?.displayName || page.version?.by?.displayName || "Unknown Author";
|
|
4065
|
+
const authorEmail = page.history?.createdBy?.email || page.version?.by?.email || "unknown@example.com";
|
|
4066
|
+
const date = contribution?.type === "created" ? page.history?.createdDate || page.version?.when : page.version?.when || (/* @__PURE__ */ new Date()).toISOString();
|
|
4067
4067
|
return {
|
|
4068
4068
|
sha: page.id,
|
|
4069
4069
|
message,
|