Skip to content

Commit

Permalink
Release @actions/github v.5.0.0 (#783)
Browse files Browse the repository at this point in the history
* update latest octokit definitions

* update package versions

* update link in release notes

* update tsc version
  • Loading branch information
thboop committed May 4, 2021
1 parent 393feda commit 208fa83
Show file tree
Hide file tree
Showing 8 changed files with 83 additions and 101 deletions.
6 changes: 3 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -27,6 +27,6 @@
"lerna": "^3.18.4",
"prettier": "^1.19.1",
"ts-jest": "^25.4.0",
"typescript": "^3.7.4"
"typescript": "^3.9.9"
}
}
6 changes: 3 additions & 3 deletions packages/github/README.md
Expand Up @@ -22,7 +22,7 @@ async function run() {
// You can also pass in additional options as a second parameter to getOctokit
// const octokit = github.getOctokit(myToken, {userAgent: "MyActionVersion1"});

const { data: pullRequest } = await octokit.pulls.get({
const { data: pullRequest } = await octokit.rest.pulls.get({
owner: 'octokit',
repo: 'rest.js',
pull_number: 123,
Expand Down Expand Up @@ -50,7 +50,7 @@ const github = require('@actions/github');

const context = github.context;

const newIssue = await octokit.issues.create({
const newIssue = await octokit.rest.issues.create({
...context.repo,
title: 'New issue!',
body: 'Hello Universe!'
Expand Down Expand Up @@ -90,7 +90,7 @@ const octokit = GitHub.plugin(enterpriseServer220Admin)
const myToken = core.getInput('myToken');
const myOctokit = new octokit(getOctokitOptions(token))
// Create a new user
myOctokit.enterpriseAdmin.createUser({
myOctokit.rest.enterpriseAdmin.createUser({
login: "testuser",
email: "testuser@test.com",
});
Expand Down
3 changes: 3 additions & 0 deletions packages/github/RELEASES.md
@@ -1,5 +1,8 @@
# @actions/github Releases

### 5.0.0
- [Update @actions/github to include latest octokit definitions](https://github.com/actions/toolkit/pull/783)

### 4.0.0
- [Add execution state information to context](https://github.com/actions/toolkit/pull/499)
- [Update Octokit Dependencies with some api breaking changes](https://github.com/actions/toolkit/pull/498)
Expand Down
4 changes: 2 additions & 2 deletions packages/github/__tests__/github.proxy.test.ts
Expand Up @@ -49,7 +49,7 @@ describe('@actions/github', () => {
}

const octokit = getOctokit(token)
const branch = await octokit.repos.getBranch({
const branch = await octokit.rest.repos.getBranch({
owner: 'actions',
repo: 'toolkit',
branch: 'main'
Expand Down Expand Up @@ -85,7 +85,7 @@ describe('@actions/github', () => {
agent: new https.Agent()
}
})
const branch = await octokit.repos.getBranch({
const branch = await octokit.rest.repos.getBranch({
owner: 'actions',
repo: 'toolkit',
branch: 'main'
Expand Down
12 changes: 6 additions & 6 deletions packages/github/__tests__/github.test.ts
Expand Up @@ -15,7 +15,7 @@ describe('@actions/github', () => {
proxyServer = proxy()
await new Promise(resolve => {
const port = Number(proxyUrl.split(':')[2])
proxyServer.listen(port, () => resolve())
proxyServer.listen(port, () => resolve(null))
})
proxyServer.on('connect', req => {
proxyConnects.push(req.url)
Expand All @@ -30,7 +30,7 @@ describe('@actions/github', () => {
afterAll(async () => {
// Stop proxy server
await new Promise(resolve => {
proxyServer.once('close', () => resolve())
proxyServer.once('close', () => resolve(null))
proxyServer.close()
})

Expand All @@ -45,7 +45,7 @@ describe('@actions/github', () => {
return
}
const octokit = new GitHub(getOctokitOptions(token))
const branch = await octokit.repos.getBranch({
const branch = await octokit.rest.repos.getBranch({
owner: 'actions',
repo: 'toolkit',
branch: 'main'
Expand All @@ -60,7 +60,7 @@ describe('@actions/github', () => {
return
}
const octokit = getOctokit(token)
const branch = await octokit.repos.getBranch({
const branch = await octokit.rest.repos.getBranch({
owner: 'actions',
repo: 'toolkit',
branch: 'main'
Expand All @@ -77,7 +77,7 @@ describe('@actions/github', () => {

// Valid token
let octokit = new GitHub({auth: `token ${token}`})
const branch = await octokit.repos.getBranch({
const branch = await octokit.rest.repos.getBranch({
owner: 'actions',
repo: 'toolkit',
branch: 'main'
Expand All @@ -89,7 +89,7 @@ describe('@actions/github', () => {
octokit = new GitHub({auth: `token asdf`})
let failed = false
try {
await octokit.repos.getBranch({
await octokit.rest.repos.getBranch({
owner: 'actions',
repo: 'toolkit',
branch: 'main'
Expand Down
141 changes: 60 additions & 81 deletions packages/github/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions packages/github/package.json
@@ -1,6 +1,6 @@
{
"name": "@actions/github",
"version": "4.0.0",
"version": "5.0.0",
"description": "Actions github lib",
"keywords": [
"github",
Expand Down Expand Up @@ -38,10 +38,10 @@
"url": "https://github.com/actions/toolkit/issues"
},
"dependencies": {
"@actions/http-client": "^1.0.8",
"@octokit/core": "^3.1.2",
"@octokit/plugin-paginate-rest": "^2.3.0",
"@octokit/plugin-rest-endpoint-methods": "^4.1.2"
"@actions/http-client": "^1.0.11",
"@octokit/core": "^3.4.0",
"@octokit/plugin-paginate-rest": "^2.13.3",
"@octokit/plugin-rest-endpoint-methods": "^5.1.1"
},
"devDependencies": {
"jest": "^25.1.0",
Expand Down

0 comments on commit 208fa83

Please sign in to comment.