@credal/actions 0.1.37 → 0.1.38

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.
@@ -21,7 +21,7 @@ const createBranch = (_a) => __awaiter(void 0, [_a], void 0, function* ({ params
21
21
  const octokit = new octokit_1.Octokit({ auth: authParams.authToken });
22
22
  try {
23
23
  // Get the reference or commit SHA for the base branch or tag
24
- const { data: baseRefData } = yield octokit.git
24
+ const { data: baseRefData } = yield octokit.rest.git
25
25
  .getRef({
26
26
  owner: repositoryOwner,
27
27
  repo: repositoryName,
@@ -34,7 +34,7 @@ const createBranch = (_a) => __awaiter(void 0, [_a], void 0, function* ({ params
34
34
  }
35
35
  else if (error.status === 404 && /^[a-f0-9]{7,39}$/i.test(baseRefOrHash)) {
36
36
  // If baseRef is a short commit SHA, try to resolve it to a full SHA
37
- const { data: commits } = yield octokit.repos.listCommits({
37
+ const { data: commits } = yield octokit.rest.repos.listCommits({
38
38
  owner: repositoryOwner,
39
39
  repo: repositoryName,
40
40
  sha: baseRefOrHash,
@@ -47,7 +47,7 @@ const createBranch = (_a) => __awaiter(void 0, [_a], void 0, function* ({ params
47
47
  throw error;
48
48
  }));
49
49
  // Create a new branch from the base reference
50
- yield octokit.git.createRef({
50
+ yield octokit.rest.git.createRef({
51
51
  owner: repositoryOwner,
52
52
  repo: repositoryName,
53
53
  ref: `refs/heads/${branchName}`,
@@ -23,7 +23,7 @@ const createOrUpdateFile = (_a) => __awaiter(void 0, [_a], void 0, function* ({
23
23
  let fileSha = undefined;
24
24
  let operationPreformed = undefined;
25
25
  try {
26
- const { data: fileData } = yield octokit.repos.getContent({
26
+ const { data: fileData } = yield octokit.rest.repos.getContent({
27
27
  owner: repositoryOwner,
28
28
  repo: repositoryName,
29
29
  path: filePath,
@@ -49,7 +49,7 @@ const createOrUpdateFile = (_a) => __awaiter(void 0, [_a], void 0, function* ({
49
49
  }
50
50
  }
51
51
  try {
52
- const { data: commitData } = yield octokit.repos.createOrUpdateFileContents({
52
+ const { data: commitData } = yield octokit.rest.repos.createOrUpdateFileContents({
53
53
  owner: repositoryOwner,
54
54
  repo: repositoryName,
55
55
  path: filePath,
@@ -21,7 +21,7 @@ const createPullRequest = (_a) => __awaiter(void 0, [_a], void 0, function* ({ p
21
21
  const octokit = new octokit_1.Octokit({ auth: authParams.authToken });
22
22
  try {
23
23
  // Create the pull request
24
- const { data: pullRequestData } = yield octokit.pulls.create({
24
+ const { data: pullRequestData } = yield octokit.rest.pulls.create({
25
25
  owner: repositoryOwner,
26
26
  repo: repositoryName,
27
27
  head,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@credal/actions",
3
- "version": "0.1.37",
3
+ "version": "0.1.38",
4
4
  "description": "AI Actions by Credal AI",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",