Set main as the default branch (#527)
* set main as the default branch * revert change to tool-cache default branch * use versions where applicable
This commit is contained in:
1 parent
b713cc4cd3
commit
cde1a0af52
4 files changed
+13
-13
No files matched your search
@@ -52,9 +52,9 @@ describe('@actions/github', () => {
|
|||||||
const branch = await octokit.repos.getBranch({
|
const branch = await octokit.repos.getBranch({
|
||||||
owner: 'actions',
|
owner: 'actions',
|
||||||
repo: 'toolkit',
|
repo: 'toolkit',
|
||||||
branch: 'master'
|
branch: 'main'
|
||||||
})
|
})
|
||||||
expect(branch.data.name).toBe('master')
|
expect(branch.data.name).toBe('main')
|
||||||
expect(proxyConnects).toEqual(['api.github.com:443'])
|
expect(proxyConnects).toEqual(['api.github.com:443'])
|
||||||
})
|
})
|
||||||
|
|
||||||
@@ -88,9 +88,9 @@ describe('@actions/github', () => {
|
|||||||
const branch = await octokit.repos.getBranch({
|
const branch = await octokit.repos.getBranch({
|
||||||
owner: 'actions',
|
owner: 'actions',
|
||||||
repo: 'toolkit',
|
repo: 'toolkit',
|
||||||
branch: 'master'
|
branch: 'main'
|
||||||
})
|
})
|
||||||
expect(branch.data.name).toBe('master')
|
expect(branch.data.name).toBe('main')
|
||||||
expect(proxyConnects).toHaveLength(0)
|
expect(proxyConnects).toHaveLength(0)
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
@@ -48,9 +48,9 @@ describe('@actions/github', () => {
|
|||||||
const branch = await octokit.repos.getBranch({
|
const branch = await octokit.repos.getBranch({
|
||||||
owner: 'actions',
|
owner: 'actions',
|
||||||
repo: 'toolkit',
|
repo: 'toolkit',
|
||||||
branch: 'master'
|
branch: 'main'
|
||||||
})
|
})
|
||||||
expect(branch.data.name).toBe('master')
|
expect(branch.data.name).toBe('main')
|
||||||
expect(proxyConnects).toHaveLength(0)
|
expect(proxyConnects).toHaveLength(0)
|
||||||
})
|
})
|
||||||
|
|
||||||
@@ -63,9 +63,9 @@ describe('@actions/github', () => {
|
|||||||
const branch = await octokit.repos.getBranch({
|
const branch = await octokit.repos.getBranch({
|
||||||
owner: 'actions',
|
owner: 'actions',
|
||||||
repo: 'toolkit',
|
repo: 'toolkit',
|
||||||
branch: 'master'
|
branch: 'main'
|
||||||
})
|
})
|
||||||
expect(branch.data.name).toBe('master')
|
expect(branch.data.name).toBe('main')
|
||||||
expect(proxyConnects).toHaveLength(0)
|
expect(proxyConnects).toHaveLength(0)
|
||||||
})
|
})
|
||||||
|
|
||||||
@@ -80,9 +80,9 @@ describe('@actions/github', () => {
|
|||||||
const branch = await octokit.repos.getBranch({
|
const branch = await octokit.repos.getBranch({
|
||||||
owner: 'actions',
|
owner: 'actions',
|
||||||
repo: 'toolkit',
|
repo: 'toolkit',
|
||||||
branch: 'master'
|
branch: 'main'
|
||||||
})
|
})
|
||||||
expect(branch.data.name).toBe('master')
|
expect(branch.data.name).toBe('main')
|
||||||
expect(proxyConnects).toHaveLength(0)
|
expect(proxyConnects).toHaveLength(0)
|
||||||
|
|
||||||
// Invalid token
|
// Invalid token
|
||||||
@@ -92,7 +92,7 @@ describe('@actions/github', () => {
|
|||||||
await octokit.repos.getBranch({
|
await octokit.repos.getBranch({
|
||||||
owner: 'actions',
|
owner: 'actions',
|
||||||
repo: 'toolkit',
|
repo: 'toolkit',
|
||||||
branch: 'master'
|
branch: 'main'
|
||||||
})
|
})
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
failed = true
|
failed = true
|
||||||
|
|||||||
+1
-1
@@ -6,7 +6,7 @@
|
|||||||
"github",
|
"github",
|
||||||
"actions"
|
"actions"
|
||||||
],
|
],
|
||||||
"homepage": "https://github.com/actions/toolkit/tree/master/packages/github",
|
"homepage": "https://github.com/actions/toolkit/tree/main/packages/github",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"main": "lib/github.js",
|
"main": "lib/github.js",
|
||||||
"types": "lib/github.d.ts",
|
"types": "lib/github.d.ts",
|
||||||
|
|||||||
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
// Originally pulled from https://github.com/JasonEtco/actions-toolkit/blob/master/src/context.ts
|
// Originally pulled from https://github.com/JasonEtco/actions-toolkit/blob/main/src/context.ts
|
||||||
import {WebhookPayload} from './interfaces'
|
import {WebhookPayload} from './interfaces'
|
||||||
import {readFileSync, existsSync} from 'fs'
|
import {readFileSync, existsSync} from 'fs'
|
||||||
import {EOL} from 'os'
|
import {EOL} from 'os'
|
||||||
|
|||||||
Reference in new issue
Block a user