Skip to content
This repository was archived by the owner on Sep 1, 2022. It is now read-only.
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions responses/14_create-js-files.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ run();
```

**Creating an issue in the repository**
Next we use that octokit client to create an issue in your repository, which will make the HTTP request to the GitHub API for us. [Look here](https://octokit.github.io/rest.js/#octokit-routes-issues-create) to learn more about `octokit.issues.create()`.
Next we use that octokit client to create an issue in your repository, which will make the HTTP request to the GitHub API for us. [Look here](https://octokit.github.io/rest.js/v18#issues-create) to learn more about `octokit.rest.issues.create()`.

```javascript
async function run() {
Expand All @@ -108,7 +108,7 @@ async function run() {

const octokit = github.getOctokit(token);

const newIssue = await octokit.issues.create({
const newIssue = await octokit.rest.issues.create({
repo: github.context.repo.repo,
owner: github.context.repo.owner,
title: issueTitle,
Expand All @@ -134,7 +134,7 @@ async function run() {

const octokit = github.getOctokit(token);

const newIssue = await octokit.issues.create({
const newIssue = await octokit.rest.issues.create({
repo: github.context.repo.repo,
owner: github.context.repo.owner,
title: issueTitle,
Expand Down
4 changes: 2 additions & 2 deletions responses/14_js-files-activity.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ I'm counting on you this time! In the previous steps I have guided you heavily o
2. Create the `core` and `github` variables
3. Create an asynchronous function named `run()`
4. Inside a try/catch block define the `issueTitle`, `jokeBody`, `token` and `octokit` variables
5. Use the `issues.create()` octokit method to define your API request
5. Use the `rest.issues.create()` octokit method to define your API request
6. Add the catch portion of the try/catch block
7. Use the `setFailed()` method from the `@actions/core` package to stop your action and log and error if something goes wrong
8. Save the file
Expand Down Expand Up @@ -35,7 +35,7 @@ async function run() {

const octokit = new github.getOctokit(token);

const newIssue = await octokit.issues.create({
const newIssue = await octokit.rest.issues.create({
repo: github.context.repo.repo,
owner: github.context.repo.owner,
title: issueTitle,
Expand Down