@credal/actions 0.2.157 → 0.2.158

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.
@@ -51,7 +51,7 @@ const searchOrganization = (_a) => __awaiter(void 0, [_a], void 0, function* ({
51
51
  name: item.name,
52
52
  path: item.path,
53
53
  sha: item.sha.slice(0, 7),
54
- url: item.url,
54
+ url: item.html_url,
55
55
  score: item.score,
56
56
  textMatches: item.text_matches
57
57
  ? item.text_matches.map(match => {
@@ -82,7 +82,7 @@ const searchOrganization = (_a) => __awaiter(void 0, [_a], void 0, function* ({
82
82
  const full = commitDetails.find(c => c.data.sha === item.sha);
83
83
  return {
84
84
  sha: item.sha,
85
- url: item.url,
85
+ url: item.html_url,
86
86
  commit: {
87
87
  message: item.commit.message,
88
88
  author: item.commit.author,
@@ -90,11 +90,11 @@ const searchOrganization = (_a) => __awaiter(void 0, [_a], void 0, function* ({
90
90
  score: item.score,
91
91
  author: (_a = item.author) !== null && _a !== void 0 ? _a : undefined,
92
92
  files: ((_b = full === null || full === void 0 ? void 0 : full.data.files) === null || _b === void 0 ? void 0 : _b.slice(0, MAX_FILES_PER_COMMIT).map(f => {
93
- var _a;
93
+ var _a, _b, _c;
94
94
  return ({
95
95
  filename: f.filename,
96
96
  status: f.status,
97
- patch: (_a = f.patch) === null || _a === void 0 ? void 0 : _a.split("\n").slice(0, MAX_PATCH_LINES).join("\n"),
97
+ patch: (_c = (_b = (_a = f.patch) === null || _a === void 0 ? void 0 : _a.split("\n")) === null || _b === void 0 ? void 0 : _b.slice(0, MAX_PATCH_LINES)) === null || _c === void 0 ? void 0 : _c.join("\n"),
98
98
  });
99
99
  })) || [],
100
100
  };
@@ -132,7 +132,7 @@ const searchOrganization = (_a) => __awaiter(void 0, [_a], void 0, function* ({
132
132
  return {
133
133
  number: item.number,
134
134
  title: item.title,
135
- html_url: item.html_url,
135
+ url: item.html_url,
136
136
  state: item.state,
137
137
  isPullRequest: isPR,
138
138
  body: item.body,
@@ -155,14 +155,14 @@ const searchOrganization = (_a) => __awaiter(void 0, [_a], void 0, function* ({
155
155
  })),
156
156
  ...enrichedCommits.map(result => ({
157
157
  type: "commit",
158
- name: result.sha,
158
+ name: `${result.sha.slice(0, 7)} – ${result.commit.message.split("\n")[0]}`,
159
159
  url: result.url,
160
160
  contents: result,
161
161
  })),
162
162
  ...issuesAndPRs.map(result => ({
163
163
  type: "issueOrPullRequest",
164
164
  name: result.title,
165
- url: result.html_url,
165
+ url: result.url,
166
166
  contents: result,
167
167
  })),
168
168
  ],
@@ -47,7 +47,7 @@ const searchRepository = (_a) => __awaiter(void 0, [_a], void 0, function* ({ pa
47
47
  name: item.name,
48
48
  path: item.path,
49
49
  sha: item.sha.slice(0, 7),
50
- url: item.url,
50
+ url: item.html_url,
51
51
  score: item.score,
52
52
  textMatches: item.text_matches
53
53
  ? item.text_matches.map(match => {
@@ -68,7 +68,7 @@ const searchRepository = (_a) => __awaiter(void 0, [_a], void 0, function* ({ pa
68
68
  const full = commitDetails.find(c => c.data.sha === item.sha);
69
69
  return {
70
70
  sha: item.sha,
71
- url: item.url,
71
+ url: item.html_url,
72
72
  commit: {
73
73
  message: item.commit.message,
74
74
  author: item.commit.author,
@@ -76,11 +76,11 @@ const searchRepository = (_a) => __awaiter(void 0, [_a], void 0, function* ({ pa
76
76
  score: item.score,
77
77
  author: (_a = item.author) !== null && _a !== void 0 ? _a : undefined,
78
78
  files: ((_b = full === null || full === void 0 ? void 0 : full.data.files) === null || _b === void 0 ? void 0 : _b.slice(0, MAX_FILES_PER_COMMIT).map(f => {
79
- var _a;
79
+ var _a, _b, _c;
80
80
  return ({
81
81
  filename: f.filename,
82
82
  status: f.status,
83
- patch: (_a = f.patch) === null || _a === void 0 ? void 0 : _a.split("\n").slice(0, MAX_PATCH_LINES).join("\n"),
83
+ patch: (_c = (_b = (_a = f.patch) === null || _a === void 0 ? void 0 : _a.split("\n")) === null || _b === void 0 ? void 0 : _b.slice(0, MAX_PATCH_LINES)) === null || _c === void 0 ? void 0 : _c.join("\n"),
84
84
  });
85
85
  })) || [],
86
86
  };
@@ -104,18 +104,18 @@ const searchRepository = (_a) => __awaiter(void 0, [_a], void 0, function* ({ pa
104
104
  const prIndex = prNumbers.indexOf(item.number);
105
105
  const files = isPR && prIndex !== -1
106
106
  ? prFiles[prIndex].data.slice(0, MAX_FILES_PER_PR).map(f => {
107
- var _a;
107
+ var _a, _b, _c;
108
108
  return ({
109
109
  filename: f.filename,
110
110
  status: f.status,
111
- patch: (_a = f.patch) === null || _a === void 0 ? void 0 : _a.split("\n").slice(0, MAX_PATCH_LINES).join("\n"),
111
+ patch: (_c = (_b = (_a = f.patch) === null || _a === void 0 ? void 0 : _a.split("\n")) === null || _b === void 0 ? void 0 : _b.slice(0, MAX_PATCH_LINES)) === null || _c === void 0 ? void 0 : _c.join("\n"),
112
112
  });
113
113
  })
114
114
  : undefined;
115
115
  return {
116
116
  number: item.number,
117
117
  title: item.title,
118
- html_url: item.html_url,
118
+ url: item.html_url,
119
119
  state: item.state,
120
120
  isPullRequest: isPR,
121
121
  body: item.body,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@credal/actions",
3
- "version": "0.2.157",
3
+ "version": "0.2.158",
4
4
  "type": "module",
5
5
  "description": "AI Actions by Credal AI",
6
6
  "sideEffects": false,