Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set main as the default branch #527

Merged
merged 3 commits into from
Jul 21, 2020
Merged
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
2 changes: 1 addition & 1 deletion .github/workflows/artifact-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: artifact-unit-tests
on:
push:
branches:
- master
- main
paths-ignore:
- '**.md'
pull_request:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/audit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: toolkit-audit
on:
push:
branches:
- master
- main
paths-ignore:
- '**.md'
pull_request:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/cache-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: cache-unit-tests
on:
push:
branches:
- master
- main
paths-ignore:
- '**.md'
pull_request:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/unit-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: toolkit-unit-tests
on:
push:
branches:
- master
- main
paths-ignore:
- '**.md'
pull_request:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/update-github.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
script: |
github.pulls.create(
{
base: "master",
base: "main",
owner: "${{github.repository_owner}}",
repo: "toolkit",
title: "Update Octokit dependencies",
Expand Down
4 changes: 2 additions & 2 deletions docs/action-types.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,14 @@ jobs:
os: [ubuntu-16.04, windows-2019]
runs-on: ${{matrix.os}}
actions:
- uses: actions/setup-node@master
- uses: actions/setup-node@v1
with:
version: ${{matrix.node}}
- run: |
npm install
- run: |
npm test
- uses: actions/custom-action@master
- uses: actions/custom-action@v1
```

JavaScript actions work on any environment that host action runtime is supported on which is currently node 12. However, a host action that runs a toolset expects the environment that it's running on to have that toolset in its PATH or using a setup-* action to acquire it on demand.
6 changes: 3 additions & 3 deletions docs/action-versioning.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@ Binding to a major version is the latest of that major version ( e.g. `v1` == "1

Major versions should guarantee compatibility. A major version can add net new capabilities but should not break existing input compatibility or break existing workflows.

Major version binding allows you to take advantage of bug fixes and critical functionality and security fixes. The `master` branch has the latest code and is unstable to bind to since changes get committed to master and released to the market place by creating a tag. In addition, a new major version carrying breaking changes will get implemented in master after branching off the previous major version.
Major version binding allows you to take advantage of bug fixes and critical functionality and security fixes. The `main` branch has the latest code and is unstable to bind to since changes get committed to main and released to the market place by creating a tag. In addition, a new major version carrying breaking changes will get implemented in main after branching off the previous major version.

> Warning: do not reference `master` since that is the latest code and can be carrying breaking changes of the next major version.
> Warning: do not reference `main` since that is the latest code and can be carrying breaking changes of the next major version.

```yaml
steps:
- uses: actions/javascript-action@master # do not do this
- uses: actions/javascript-action@main # do not do this
```

Binding to the immutable full sha1 may offer more reliability. However, note that the hosted images toolsets (e.g. ubuntu-latest) move forward and if there is a tool breaking issue, actions may react with a patch to a major version to compensate so binding to a specific SHA may prevent you from getting fixes.
Expand Down
2 changes: 1 addition & 1 deletion docs/commands.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# :: Commands

The [core toolkit package](https://github.com/actions/toolkit/tree/master/packages/core) offers a number of convenience functions for
The [core toolkit package](https://github.com/actions/toolkit/tree/main/packages/core) offers a number of convenience functions for
setting results, logging, registering secrets and exporting variables across actions. Sometimes, however, its useful to be able to do
these things in a script or other tool.

Expand Down
2 changes: 1 addition & 1 deletion docs/container-action.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ e.g. To use https://github.com/actions/setup-node, users will author:

```yaml
steps:
using: actions/setup-node@master
using: actions/setup-node@v1
```

# Define Metadata
Expand Down
8 changes: 4 additions & 4 deletions docs/problem-matchers.md
Original file line number Diff line number Diff line change
Expand Up @@ -111,10 +111,10 @@ Registering two problem-matchers with the same owner will result in only the pro
## Examples

Some of the starter actions are already using problem matchers, for example:
- [setup-node](https://github.com/actions/setup-node/tree/master/.github)
- [setup-python](https://github.com/actions/setup-python/tree/master/.github)
- [setup-go](https://github.com/actions/setup-go/tree/master/.github)
- [setup-dotnet](https://github.com/actions/setup-dotnet/tree/master/.github)
- [setup-node](https://github.com/actions/setup-node/tree/main/.github)
- [setup-python](https://github.com/actions/setup-python/tree/main/.github)
- [setup-go](https://github.com/actions/setup-go/tree/main/.github)
- [setup-dotnet](https://github.com/actions/setup-dotnet/tree/main/.github)

## Troubleshooting

Expand Down
2 changes: 1 addition & 1 deletion packages/artifact/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,6 @@ Check out [implementation-details](docs/implementation-details.md) for extra inf

## Contributions

See [contributor guidelines](https://github.com/actions/toolkit/blob/master/.github/CONTRIBUTING.md) for general guidelines and information about toolkit contributions.
See [contributor guidelines](https://github.com/actions/toolkit/blob/main/.github/CONTRIBUTING.md) for general guidelines and information about toolkit contributions.

For contributions related to this package, see [artifact contributions](CONTRIBUTIONS.md) for more information.
2 changes: 1 addition & 1 deletion packages/artifact/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"actions",
"artifact"
],
"homepage": "https://github.com/actions/toolkit/tree/master/packages/artifact",
"homepage": "https://github.com/actions/toolkit/tree/main/packages/artifact",
"license": "MIT",
"main": "lib/artifact-client.js",
"types": "lib/artifact-client.d.ts",
Expand Down
6 changes: 3 additions & 3 deletions packages/cache/__tests__/restoreCache.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ test('restore with gzip compressed cache found', async () => {

const cacheEntry: ArtifactCacheEntry = {
cacheKey: key,
scope: 'refs/heads/master',
scope: 'refs/heads/main',
archiveLocation: 'www.actionscache.test/download'
}
const getCacheMock = jest.spyOn(cacheHttpClient, 'getCacheEntry')
Expand Down Expand Up @@ -166,7 +166,7 @@ test('restore with zstd compressed cache found', async () => {

const cacheEntry: ArtifactCacheEntry = {
cacheKey: key,
scope: 'refs/heads/master',
scope: 'refs/heads/main',
archiveLocation: 'www.actionscache.test/download'
}
const getCacheMock = jest.spyOn(cacheHttpClient, 'getCacheEntry')
Expand Down Expand Up @@ -223,7 +223,7 @@ test('restore with cache found for restore key', async () => {

const cacheEntry: ArtifactCacheEntry = {
cacheKey: restoreKey,
scope: 'refs/heads/master',
scope: 'refs/heads/main',
archiveLocation: 'www.actionscache.test/download'
}
const getCacheMock = jest.spyOn(cacheHttpClient, 'getCacheEntry')
Expand Down
2 changes: 1 addition & 1 deletion packages/cache/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"actions",
"cache"
],
"homepage": "https://github.com/actions/toolkit/tree/master/packages/cache",
"homepage": "https://github.com/actions/toolkit/tree/main/packages/cache",
"license": "MIT",
"main": "lib/cache.js",
"types": "lib/cache.d.ts",
Expand Down
2 changes: 1 addition & 1 deletion packages/cache/src/internal/cacheUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import * as util from 'util'
import {v4 as uuidV4} from 'uuid'
import {CacheFilename, CompressionMethod} from './constants'

// From https://github.com/actions/toolkit/blob/master/packages/tool-cache/src/tool-cache.ts#L23
// From https://github.com/actions/toolkit/blob/main/packages/tool-cache/src/tool-cache.ts#L23
export async function createTempDirectory(): Promise<string> {
const IS_WINDOWS = process.platform === 'win32'

Expand Down
2 changes: 1 addition & 1 deletion packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"actions",
"core"
],
"homepage": "https://github.com/actions/toolkit/tree/master/packages/core",
"homepage": "https://github.com/actions/toolkit/tree/main/packages/core",
"license": "MIT",
"main": "lib/core.js",
"types": "lib/core.d.ts",
Expand Down
2 changes: 1 addition & 1 deletion packages/exec/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"actions",
"exec"
],
"homepage": "https://github.com/actions/toolkit/tree/master/packages/exec",
"homepage": "https://github.com/actions/toolkit/tree/main/packages/exec",
"license": "MIT",
"main": "lib/exec.js",
"types": "lib/exec.d.ts",
Expand Down
8 changes: 4 additions & 4 deletions packages/github/__tests__/github.proxy.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,9 @@ describe('@actions/github', () => {
const branch = await octokit.repos.getBranch({
owner: 'actions',
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'])
})

Expand Down Expand Up @@ -88,9 +88,9 @@ describe('@actions/github', () => {
const branch = await octokit.repos.getBranch({
owner: 'actions',
repo: 'toolkit',
branch: 'master'
branch: 'main'
})
expect(branch.data.name).toBe('master')
expect(branch.data.name).toBe('main')
expect(proxyConnects).toHaveLength(0)
})

Expand Down
14 changes: 7 additions & 7 deletions packages/github/__tests__/github.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,9 @@ describe('@actions/github', () => {
const branch = await octokit.repos.getBranch({
owner: 'actions',
repo: 'toolkit',
branch: 'master'
branch: 'main'
})
expect(branch.data.name).toBe('master')
expect(branch.data.name).toBe('main')
expect(proxyConnects).toHaveLength(0)
})

Expand All @@ -63,9 +63,9 @@ describe('@actions/github', () => {
const branch = await octokit.repos.getBranch({
owner: 'actions',
repo: 'toolkit',
branch: 'master'
branch: 'main'
})
expect(branch.data.name).toBe('master')
expect(branch.data.name).toBe('main')
expect(proxyConnects).toHaveLength(0)
})

Expand All @@ -80,9 +80,9 @@ describe('@actions/github', () => {
const branch = await octokit.repos.getBranch({
owner: 'actions',
repo: 'toolkit',
branch: 'master'
branch: 'main'
})
expect(branch.data.name).toBe('master')
expect(branch.data.name).toBe('main')
expect(proxyConnects).toHaveLength(0)

// Invalid token
Expand All @@ -92,7 +92,7 @@ describe('@actions/github', () => {
await octokit.repos.getBranch({
owner: 'actions',
repo: 'toolkit',
branch: 'master'
branch: 'main'
})
} catch (err) {
failed = true
Expand Down
2 changes: 1 addition & 1 deletion packages/github/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"github",
"actions"
],
"homepage": "https://github.com/actions/toolkit/tree/master/packages/github",
"homepage": "https://github.com/actions/toolkit/tree/main/packages/github",
"license": "MIT",
"main": "lib/github.js",
"types": "lib/github.d.ts",
Expand Down
2 changes: 1 addition & 1 deletion packages/github/src/context.ts
Original file line number Diff line number Diff line change
@@ -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 {readFileSync, existsSync} from 'fs'
import {EOL} from 'os'
Expand Down
2 changes: 1 addition & 1 deletion packages/glob/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"actions",
"glob"
],
"homepage": "https://github.com/actions/toolkit/tree/master/packages/glob",
"homepage": "https://github.com/actions/toolkit/tree/main/packages/glob",
"license": "MIT",
"main": "lib/glob.js",
"types": "lib/glob.d.ts",
Expand Down
2 changes: 1 addition & 1 deletion packages/io/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"actions",
"io"
],
"homepage": "https://github.com/actions/toolkit/tree/master/packages/io",
"homepage": "https://github.com/actions/toolkit/tree/main/packages/io",
"license": "MIT",
"main": "lib/io.js",
"types": "lib/io.d.ts",
Expand Down
2 changes: 1 addition & 1 deletion packages/tool-cache/__tests__/manifest.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import osm = require('os')
import cp = require('child_process')
//import {coerce} from 'semver'

// we fetch the manifest file from master of a repo
// we fetch the manifest file from main of a repo
const owner = 'actions'
const repo = 'some-tool'
const fakeToken = 'notrealtoken'
Expand Down
2 changes: 1 addition & 1 deletion packages/tool-cache/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"actions",
"exec"
],
"homepage": "https://github.com/actions/toolkit/tree/master/packages/tool-cache",
"homepage": "https://github.com/actions/toolkit/tree/main/packages/tool-cache",
"license": "MIT",
"main": "lib/tool-cache.js",
"types": "lib/tool-cache.d.ts",
Expand Down