Skip to content

Commit e13c593

Browse files
committed
refactor(RepositoryFiles): Missing a required argument from the function headers
Commit messages are required for most of the RepositoryFile functions and was missing. BREAKING CHANGE: create, edit and remove functions now require the commitMessage function argument
1 parent 9b779a0 commit e13c593

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/services/RepositoryFiles.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,15 @@ class RepositoryFiles extends BaseService {
66
filePath: string,
77
branch: string,
88
content: string,
9+
commitMessage: string,
910
options?: BaseRequestOptions,
1011
) {
1112
const [pId, path] = [projectId, filePath].map(encodeURIComponent);
1213

1314
return RequestHelper.post(this, `projects/${pId}/repository/files/${path}`, {
1415
branch,
1516
content,
17+
commitMessage,
1618
...options,
1719
});
1820
}
@@ -22,22 +24,25 @@ class RepositoryFiles extends BaseService {
2224
filePath: string,
2325
branch: string,
2426
content: string,
27+
commitMessage: string,
2528
options?: BaseRequestOptions,
2629
) {
2730
const [pId, path] = [projectId, filePath].map(encodeURIComponent);
2831

2932
return RequestHelper.put(this, `projects/${pId}/repository/files/${path}`, {
3033
branch,
3134
content,
35+
commitMessage,
3236
...options,
3337
});
3438
}
3539

36-
remove(projectId: ProjectId, filePath: string, branch: string, options?: BaseRequestOptions) {
40+
remove(projectId: ProjectId, filePath: string, branch: string, commitMessage: string, options?: BaseRequestOptions) {
3741
const [pId, path] = [projectId, filePath].map(encodeURIComponent);
3842

3943
return RequestHelper.del(this, `projects/${pId}/repository/files/${path}`, {
4044
branch,
45+
commitMessage,
4146
...options,
4247
});
4348
}

0 commit comments

Comments
 (0)