Skip to content

Commit

Permalink
Change master to main (#2044)
Browse files Browse the repository at this point in the history
  • Loading branch information
anbraten authored Jul 31, 2023
1 parent 7efb15b commit e0ed1b3
Show file tree
Hide file tree
Showing 48 changed files with 235 additions and 270 deletions.
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,9 @@ body:
label: Validations
description: Before submitting the issue, please make sure you do the following
options:
# - label: Follow our [Code of Conduct](https://github.com/woodpecker-ci/woodpecker/blob/master/CODE_OF_CONDUCT.md)
# - label: Follow our [Code of Conduct](https://github.com/woodpecker-ci/woodpecker/blob/main/CODE_OF_CONDUCT.md)
# required: true
- label: Read the [Contributing Guidelines](https://github.com/woodpecker-ci/woodpecker/blob/master/CONTRIBUTING.md).
- label: Read the [Contributing Guidelines](https://github.com/woodpecker-ci/woodpecker/blob/main/CONTRIBUTING.md).
required: true
- label: Read the [docs](https://woodpecker-ci.org/docs/intro).
required: true
Expand Down
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/feature_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,11 @@ body:
label: Validations
description: Before submitting the issue, please make sure you do the following
options:
# - label: Follow our [Code of Conduct](https://github.com/woodpecker-ci/woodpecker/blob/master/CODE_OF_CONDUCT.md)
# - label: Follow our [Code of Conduct](https://github.com/woodpecker-ci/woodpecker/blob/main/CODE_OF_CONDUCT.md)
# required: true
- label: Checked that the feature isn't part of the `next` version already [https://woodpecker-ci.org/faq#which-version-of-woodpecker-should-i-use]
required: true
- label: Read the [Contributing Guidelines](https://github.com/woodpecker-ci/woodpecker/blob/master/CONTRIBUTING.md).
- label: Read the [Contributing Guidelines](https://github.com/woodpecker-ci/woodpecker/blob/main/CONTRIBUTING.md).
required: true
- label: Read the [docs](https://woodpecker-ci.org/docs/intro).
required: true
Expand Down
37 changes: 0 additions & 37 deletions .github/ISSUE_TEMPLATE/plugin_index.yml.disabled

This file was deleted.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<img src="https://ci.woodpecker-ci.org/api/badges/woodpecker-ci/woodpecker/status.svg">
</a>
<a href="https://codecov.io/gh/woodpecker-ci/woodpecker">
<img src="https://codecov.io/gh/woodpecker-ci/woodpecker/branch/master/graph/badge.svg"/>
<img src="https://codecov.io/gh/woodpecker-ci/woodpecker/branch/main/graph/badge.svg"/>
</a>
<a href="https://translate.woodpecker-ci.org/engage/woodpecker-ci/">
<img src="https://translate.woodpecker-ci.org/widgets/woodpecker-ci/-/ui/svg-badge.svg" alt="Translation status" />
Expand Down
2 changes: 1 addition & 1 deletion cli/deploy/deploy.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ var Command = &cli.Command{
&cli.StringFlag{
Name: "branch",
Usage: "branch filter",
Value: "master",
Value: "main",
},
&cli.StringFlag{
Name: "event",
Expand Down
2 changes: 1 addition & 1 deletion cli/pipeline/last.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ var pipelineLastCmd = &cli.Command{
&cli.StringFlag{
Name: "branch",
Usage: "branch name",
Value: "master",
Value: "main",
},
),
}
Expand Down
2 changes: 1 addition & 1 deletion docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,5 @@ Deployment happen via [CI](https://github.com/woodpecker-ci/woodpecker/blob/d59f
To manually build the website and push it exec:

```sh
GIT_USER=woodpecker-bot USE_SSH=true DEPLOYMENT_BRANCH=master pnpm deploy
GIT_USER=woodpecker-bot USE_SSH=true DEPLOYMENT_BRANCH=main pnpm deploy
```
20 changes: 10 additions & 10 deletions docs/docs/20-usage/20-pipeline-syntax.md
Original file line number Diff line number Diff line change
Expand Up @@ -266,16 +266,16 @@ steps:
settings:
channel: dev
+ when:
+ - branch: master
+ - branch: main
```

> The step now triggers on master, but also if the target branch of a pull request is `master`. Add an event condition to limit it further to pushes on master only.
> The step now triggers on main branch, but also if the target branch of a pull request is `main`. Add an event condition to limit it further to pushes on main only.

Execute a step if the branch is `master` or `develop`:
Execute a step if the branch is `main` or `develop`:

```yaml
when:
- branch: [master, develop]
- branch: [main, develop]
```

Execute a step if the branch starts with `prefix/*`:
Expand All @@ -297,7 +297,7 @@ Execute a step using custom include and exclude logic:
```yaml
when:
- branch:
include: [ master, release/* ]
include: [ main, release/* ]
exclude: [ release/1.0.0, release/1.1.* ]
```

Expand Down Expand Up @@ -765,7 +765,7 @@ Example conditional execution by branch:

```diff
+when:
+ branch: master
+ branch: main
+
steps:
slack:
Expand All @@ -774,13 +774,13 @@ Example conditional execution by branch:
channel: dev
```

> The step now triggers on master, but also if the target branch of a pull request is `master`. Add an event condition to limit it further to pushes on master only.
> The step now triggers on main, but also if the target branch of a pull request is `main`. Add an event condition to limit it further to pushes on main only.

Execute a step if the branch is `master` or `develop`:
Execute a step if the branch is `main` or `develop`:

```diff
when:
branch: [master, develop]
branch: [main, develop]
```

Execute a step if the branch starts with `prefix/*`:
Expand All @@ -795,7 +795,7 @@ Execute a step using custom include and exclude logic:
```diff
when:
branch:
include: [ master, release/* ]
include: [ main, release/* ]
exclude: [ release/1.0.0, release/1.1.* ]
```

Expand Down
2 changes: 1 addition & 1 deletion docs/docs/20-usage/50-environment.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ This is the reference list of all environment variables available to your pipeli
| `CI_REPO_SCM` | repository SCM (git) |
| `CI_REPO_URL` | repository web URL |
| `CI_REPO_CLONE_URL` | repository clone URL |
| `CI_REPO_DEFAULT_BRANCH` | repository default branch (master) |
| `CI_REPO_DEFAULT_BRANCH` | repository default branch (main) |
| `CI_REPO_PRIVATE` | repository is private |
| `CI_REPO_TRUSTED` | repository is trusted |
| | **Current Commit** |
Expand Down
2 changes: 1 addition & 1 deletion docs/docs/20-usage/80-badges.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Woodpecker has integrated support for repository status badges. These badges can
<scheme>://<hostname>/api/badges/<repo-id>/status.svg
```

The status badge displays the status for the latest build to your default branch (e.g. master). You can customize the branch by adding the `branch` query parameter.
The status badge displays the status for the latest build to your default branch (e.g. main). You can customize the branch by adding the `branch` query parameter.

```diff
-<scheme>://<hostname>/api/badges/<repo-id>/status.svg
Expand Down
4 changes: 2 additions & 2 deletions docs/docs/30-administration/10-server-config.md
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,7 @@ Always use authentication to clone repositories even if they are public. Needed
List of event names that will be canceled when a new pipeline for the same context (tag, branch) is created.

### `WOODPECKER_DEFAULT_CLONE_IMAGE`
> Default is defined in [shared/constant/constant.go](https://github.com/woodpecker-ci/woodpecker/blob/master/shared/constant/constant.go)
> Default is defined in [shared/constant/constant.go](https://github.com/woodpecker-ci/woodpecker/blob/main/shared/constant/constant.go)
The default docker image to be used when cloning the repo

Expand All @@ -357,7 +357,7 @@ The maximum time in minutes you can set in the repo settings before a pipeline g
Configures the session expiration time.

### `WOODPECKER_ESCALATE`
> Defaults are defined in [shared/constant/constant.go](https://github.com/woodpecker-ci/woodpecker/blob/master/shared/constant/constant.go)
> Defaults are defined in [shared/constant/constant.go](https://github.com/woodpecker-ci/woodpecker/blob/main/shared/constant/constant.go)
Docker images to run in privileged mode. Only change if you are sure what you do!

Expand Down
4 changes: 2 additions & 2 deletions docs/docs/30-administration/100-external-configuration-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ WOODPECKER_CONFIG_SERVICE_ENDPOINT=https://example.com/ciconfig
"author": "myUser",
"author_avatar": "https://myforge.com/avatars/d6b3f7787a685fcdf2a44e2c685c7e03",
"author_email": "my@email.com",
"branch": "master",
"branch": "main",
"changed_files": [
"somefilename.txt"
],
Expand All @@ -67,7 +67,7 @@ WOODPECKER_CONFIG_SERVICE_ENDPOINT=https://example.com/ciconfig
"message": "test old config\n",
"number": 0,
"parent": 0,
"ref": "refs/heads/master",
"ref": "refs/heads/main",
"refspec": "",
"clone_url": "",
"reviewed_at": 0,
Expand Down
4 changes: 2 additions & 2 deletions docs/docs/30-administration/90-prometheus.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,11 @@ List of Prometheus metrics specific to Woodpecker:
```
# HELP woodpecker_pipeline_count Pipeline count.
# TYPE woodpecker_pipeline_count counter
woodpecker_build_count{branch="master",pipeline="total",repo="woodpecker-ci/woodpecker",status="success"} 3
woodpecker_build_count{branch="main",pipeline="total",repo="woodpecker-ci/woodpecker",status="success"} 3
woodpecker_build_count{branch="mkdocs",pipeline="total",repo="woodpecker-ci/woodpecker",status="success"} 3
# HELP woodpecker_pipeline_time Build time.
# TYPE woodpecker_pipeline_time gauge
woodpecker_build_time{branch="master",pipeline="total",repo="woodpecker-ci/woodpecker",status="success"} 116
woodpecker_build_time{branch="main",pipeline="total",repo="woodpecker-ci/woodpecker",status="success"} 116
woodpecker_build_time{branch="mkdocs",pipeline="total",repo="woodpecker-ci/woodpecker",status="success"} 155
# HELP woodpecker_pipeline_total_count Total number of builds.
# TYPE woodpecker_pipeline_total_count gauge
Expand Down
16 changes: 8 additions & 8 deletions docs/docs/92-awesome.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,20 @@

A curated list of awesome things related to Woodpecker-CI.

If you have some missing resources, please feel free to [open a pull-request](https://github.com/woodpecker-ci/woodpecker/edit/master/docs/docs/92-awesome.md) and add them.
If you have some missing resources, please feel free to [open a pull-request](https://github.com/woodpecker-ci/woodpecker/edit/main/docs/docs/92-awesome.md) and add them.

## Official Resources

- [Woodpecker CI pipeline configs](https://github.com/woodpecker-ci/woodpecker/tree/master/.woodpecker) - Complex setup containing different kind of pipelines
- [Golang tests](https://github.com/woodpecker-ci/woodpecker/blob/master/.woodpecker/test.yml)
- [Typescript, eslint & Vue](https://github.com/woodpecker-ci/woodpecker/blob/master/.woodpecker/web.yml)
- [Docusaurus & publishing to GitHub Pages](https://github.com/woodpecker-ci/woodpecker/blob/master/.woodpecker/docs.yml)
- [Docker container building](https://github.com/woodpecker-ci/woodpecker/blob/master/.woodpecker/docker.yml)
- [Helm chart linting & releasing](https://github.com/woodpecker-ci/woodpecker/blob/master/.woodpecker/helm.yml)
- [Woodpecker CI pipeline configs](https://github.com/woodpecker-ci/woodpecker/tree/main/.woodpecker) - Complex setup containing different kind of pipelines
- [Golang tests](https://github.com/woodpecker-ci/woodpecker/blob/main/.woodpecker/test.yml)
- [Typescript, eslint & Vue](https://github.com/woodpecker-ci/woodpecker/blob/main/.woodpecker/web.yml)
- [Docusaurus & publishing to GitHub Pages](https://github.com/woodpecker-ci/woodpecker/blob/main/.woodpecker/docs.yml)
- [Docker container building](https://github.com/woodpecker-ci/woodpecker/blob/main/.woodpecker/docker.yml)
- [Helm chart linting & releasing](https://github.com/woodpecker-ci/woodpecker/blob/main/.woodpecker/helm.yml)

## Projects using Woodpecker

- [Woodpecker-CI](https://github.com/woodpecker-ci/woodpecker/tree/master/.woodpecker) itself
- [Woodpecker-CI](https://github.com/woodpecker-ci/woodpecker/tree/main/.woodpecker) itself
- [All official plugins](https://github.com/woodpecker-ci?q=plugin&type=all)
- [dessalines/thumb-key](https://github.com/dessalines/thumb-key/blob/main/.woodpecker.yml) - Android Jetpack compose linting and building

Expand Down
2 changes: 1 addition & 1 deletion docs/docs/92-development/03-ui.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,6 @@ The following list contains some tools and frameworks used by the Woodpecker UI.
## Messages and Translations

Woodpecker uses [Vue I18n](https://vue-i18n.intlify.dev/) as translation library. New translations have to be added to `web/src/assets/locales/en.json`. The English source file will be automatically imported into [Weblate](https://translate.woodpecker-ci.org/) (the translation system used by Woodpecker) where all other languages will be translated by the community based on the English source.
You must not provide translations except English in PRs, otherwise weblate could put git into conflicts (when someone has translated in that language file and changes are not into master branch yet)
You must not provide translations except English in PRs, otherwise weblate could put git into conflicts (when someone has translated in that language file and changes are not into main branch yet)

For more information about translations see [Translations](./07-translations.md).
2 changes: 1 addition & 1 deletion docs/docs/92-development/06-guides.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,4 @@ To automatically execute the migration after the start of the server, the new mi

## Constants of official images

All official default images, are saved in [shared/constant/constant.go](https://github.com/woodpecker-ci/woodpecker/blob/master/shared/constant/constant.go) and must be pinned by an exact tag.
All official default images, are saved in [shared/constant/constant.go](https://github.com/woodpecker-ci/woodpecker/blob/main/shared/constant/constant.go) and must be pinned by an exact tag.
2 changes: 1 addition & 1 deletion docs/docs/92-development/08-swagger.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ These guidelines aim to have consistent wording in the swagger doc:
* `@Param Authorization` is almost always present, there are just a few un-protected endpoints

There are many examples in the server/api package, which you can use a blueprint.
More enhanced information you can find here https://github.com/swaggo/swag/blob/master/README.md#declarative-comments-format
More enhanced information you can find here https://github.com/swaggo/swag/blob/main/README.md#declarative-comments-format

### Manual code generation

Expand Down
2 changes: 1 addition & 1 deletion docs/docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ module.exports = {
({
docs: {
sidebarPath: require.resolve('./sidebars.js'),
editUrl: 'https://github.com/woodpecker-ci/woodpecker/edit/master/docs/',
editUrl: 'https://github.com/woodpecker-ci/woodpecker/edit/main/docs/',
includeCurrentVersion: true,
lastVersion: '1.0',
versions: {
Expand Down
2 changes: 1 addition & 1 deletion docs/plugins/woodpecker-plugins/plugins.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"plugins": [
{
"name": "Clone plugin",
"docs": "https://raw.githubusercontent.com/woodpecker-ci/plugin-git/master/docs.md",
"docs": "https://raw.githubusercontent.com/woodpecker-ci/plugin-git/main/docs.md",
"verified": true
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,16 +33,18 @@ function PluginPanel({ plugin }: { plugin: WoodpeckerPlugin }) {

export function WoodpeckerPluginList({ plugins }: { plugins: WoodpeckerPlugin[] }) {
const applyForIndexUrl =
'https://github.com/woodpecker-ci/woodpecker/edit/master/docs/plugins/woodpecker-plugins/plugins.json';
'https://github.com/woodpecker-ci/woodpecker/edit/main/docs/plugins/woodpecker-plugins/plugins.json';

const [query, setQuery] = useState('');

const fuse = useRef(new Fuse(plugins, {
keys: ['name', 'description'],
threshold: 0.3,
}));
const fuse = useRef(
new Fuse(plugins, {
keys: ['name', 'description'],
threshold: 0.3,
}),
);

const searchedPlugins = query.length >= 1 ? fuse.current.search(query).map((p) => ( p.item )) : plugins;
const searchedPlugins = query.length >= 1 ? fuse.current.search(query).map((p) => p.item) : plugins;

return (
<Layout title="Woodpecker CI plugins" description="List of all Woodpecker-CI plugins">
Expand Down
2 changes: 1 addition & 1 deletion pipeline/frontend/yaml/compiler/cacher.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ func (c *volumeCacher) Restore(repo, branch string, mounts []string) *yaml_types
"path": "/cache",
"restore": true,
"file": strings.Replace(branch, "/", "_", -1) + ".tar",
"fallback_to": "master.tar",
"fallback_to": "main.tar",
},
Volumes: yaml_types.Volumes{
Volumes: []*yaml_types.Volume{
Expand Down
Loading

0 comments on commit e0ed1b3

Please sign in to comment.