Browse Source

chore: change default branch to `main` (#6285)

ᴜɴᴋɴᴡᴏɴ 3 years ago
parent
commit
f6d672a3cd

+ 2 - 2
.github/workflows/codeql.yml

@@ -2,7 +2,7 @@ name: "Code scanning - action"
 
 on:
   push:
-    branches: [master]
+    branches: [main]
   schedule:
     - cron: '0 19 * * 0'
 
@@ -24,7 +24,7 @@ jobs:
     # the head of the pull request instead of the merge commit.
     - run: git checkout HEAD^2
       if: ${{ github.event_name == 'pull_request' }}
-      
+
     # Initializes the CodeQL tools for scanning.
     - name: Initialize CodeQL
       uses: github/codeql-action/init@v1

+ 1 - 1
.github/workflows/shell.yml

@@ -1,7 +1,7 @@
 name: Shell
 on:
   push:
-    branches: [master]
+    branches: [main]
   pull_request:
 jobs:
   shellcheck:

+ 4 - 2
CHANGELOG.md

@@ -2,12 +2,14 @@
 
 All notable changes to Gogs are documented in this file.
 
-## 0.13.0+dev (`master`)
+## 0.13.0+dev (`main`)
 
 ### Added
 
 ### Changed
 
+- The default branch has been changed to `main`. [#6285](https://github.com/gogs/gogs/pull/6285)
+
 ### Fixed
 
 ### Removed
@@ -41,7 +43,7 @@ All notable changes to Gogs are documented in this file.
 
 ### Added
 
-- Support for Git LFS, you can read documentation for both [user](https://github.com/gogs/gogs/blob/master/docs/user/lfs.md) and [admin](https://github.com/gogs/gogs/blob/master/docs/admin/lfs.md). [#1322](https://github.com/gogs/gogs/issues/1322)
+- Support for Git LFS, you can read documentation for both [user](https://github.com/gogs/gogs/blob/main/docs/user/lfs.md) and [admin](https://github.com/gogs/gogs/blob/main/docs/admin/lfs.md). [#1322](https://github.com/gogs/gogs/issues/1322)
 - Allow admin to remove observers from the repository. [#5803](https://github.com/gogs/gogs/pull/5803)
 - Use `Last-Modified` HTTP header for raw files. [#5811](https://github.com/gogs/gogs/issues/5811)
 - Support syntax highlighting for SAS code files (i.e. `.r`, `.sas`, `.tex`, `.yaml`). [#5856](https://github.com/gogs/gogs/pull/5856)

+ 3 - 3
README.md

@@ -1,4 +1,4 @@
-# <img src="https://github.com/gogs/gogs/raw/master/public/img/favicon.png" width="45" align="left">Gogs - A painless self-hosted Git service
+# <img src="https://github.com/gogs/gogs/raw/main/public/img/favicon.png" width="45" align="left">Gogs - A painless self-hosted Git service
 
 [![GitHub Workflow Status](https://img.shields.io/github/workflow/status/gogs/gogs/Go?logo=github&style=for-the-badge)](https://github.com/gogs/gogs/actions?query=workflow%3AGo) [![Discord](https://img.shields.io/discord/382595433060499458.svg?style=for-the-badge&logo=discord)](https://discord.gg/9aqdHU7) [![Sourcegraph](https://img.shields.io/badge/view%20on-Sourcegraph-brightgreen.svg?style=for-the-badge&logo=sourcegraph)](https://sourcegraph.com/github.com/gogs/gogs)
 
@@ -56,7 +56,7 @@ There are 6 ways to install Gogs:
 - [Install from binary](https://gogs.io/docs/installation/install_from_binary.html)
 - [Install from source](https://gogs.io/docs/installation/install_from_source.html)
 - [Install from packages](https://gogs.io/docs/installation/install_from_packages.html)
-- [Ship with Docker](https://github.com/gogs/gogs/tree/master/docker)
+- [Ship with Docker](https://github.com/gogs/gogs/tree/main/docker)
 - [Install with Vagrant](https://github.com/geerlingguy/ansible-vagrant-examples/tree/master/gogs)
 - [Install with Kubernetes Using Helm Charts](https://github.com/helm/charts/tree/master/incubator/gogs)
 
@@ -109,4 +109,4 @@ There are 6 ways to install Gogs:
 
 ## License
 
-This project is under the MIT License. See the [LICENSE](https://github.com/gogs/gogs/blob/master/LICENSE) file for the full license text.
+This project is under the MIT License. See the [LICENSE](https://github.com/gogs/gogs/blob/main/LICENSE) file for the full license text.

+ 2 - 2
README_ZH.md

@@ -53,7 +53,7 @@ Gogs(`/gɑgz/`)项目旨在打造一个以最简便的方式搭建简单、
 - [二进制安装](https://gogs.io/docs/installation/install_from_binary.html)
 - [源码安装](https://gogs.io/docs/installation/install_from_source.html)
 - [包管理安装](https://gogs.io/docs/installation/install_from_packages.html)
-- [采用 Docker 部署](https://github.com/gogs/gogs/tree/master/docker)
+- [采用 Docker 部署](https://github.com/gogs/gogs/tree/main/docker)
 - [通过 Vagrant 安装](https://github.com/geerlingguy/ansible-vagrant-examples/tree/master/gogs)
 - [通过基于 Kubernetes 的 Helm Charts](https://github.com/helm/charts/tree/master/incubator/gogs)
 
@@ -100,4 +100,4 @@ Gogs(`/gɑgz/`)项目旨在打造一个以最简便的方式搭建简单、
 
 ## 授权许可
 
-本项目采用 MIT 开源授权许可证,完整的授权说明已放置在 [LICENSE](https://github.com/gogs/gogs/blob/master/LICENSE) 文件中。
+本项目采用 MIT 开源授权许可证,完整的授权说明已放置在 [LICENSE](https://github.com/gogs/gogs/blob/main/LICENSE) 文件中。

+ 1 - 1
docker/README.md

@@ -79,7 +79,7 @@ Most of settings are obvious and easy to understand, but there are some settings
 - **HTTP Port**: Use port you want Gogs to listen on inside Docker container. For example, your Gogs listens on `3000` inside Docker, **and** you expose it by `10080:3000`, but you still use `3000` for this value.
 - **Application URL**: Use combination of **Domain** and **exposed HTTP Port** values (e.g. `http://192.168.99.100:10080/`).
 
-Full documentation of application settings can be found [here](https://github.com/gogs/gogs/blob/master/conf/app.ini).
+Full documentation of application settings can be found [here](https://github.com/gogs/gogs/blob/main/conf/app.ini).
 
 ### Container Options
 

+ 5 - 5
docs/dev/release/issue_template_minor_version.md

@@ -3,16 +3,16 @@
 On develop branch:
 
 - [ ] Close stale issues with the label [status: needs feedback](https://github.com/gogs/gogs/issues?q=is%3Aissue+is%3Aopen+label%3A%22status%3A+needs+feedback%22).
-- [ ] [Sync locales from Crowdin](https://github.com/gogs/gogs/blob/master/docs/dev/import_locale.md).
-- [ ] Update [CHANGELOG](https://github.com/gogs/gogs/blob/master/CHANGELOG.md) to include entries for the current release.
+- [ ] [Sync locales from Crowdin](https://github.com/gogs/gogs/blob/main/docs/dev/import_locale.md).
+- [ ] Update [CHANGELOG](https://github.com/gogs/gogs/blob/main/CHANGELOG.md) to include entries for the current release.
 - [ ] Cut a new release branch `release/<MAJOR>.<MINOR>`, e.g. `release/0.12`.
 
 ## During release
 
 On release branch:
 
-- [ ] Update the [hard-coded version](https://github.com/gogs/gogs/blob/master/gogs.go#L21) to the current release, e.g. `0.12.0+dev` -> `0.12.0`.
-- [ ] Publish a new [GitHub release](https://github.com/gogs/gogs/releases) with entries from [CHANGELOG](https://github.com/gogs/gogs/blob/master/CHANGELOG.md) for the current release.
+- [ ] Update the [hard-coded version](https://github.com/gogs/gogs/blob/main/gogs.go#L21) to the current release, e.g. `0.12.0+dev` -> `0.12.0`.
+- [ ] Publish a new [GitHub release](https://github.com/gogs/gogs/releases) with entries from [CHANGELOG](https://github.com/gogs/gogs/blob/main/CHANGELOG.md) for the current release.
 - [ ] Wait for a new [Docker Hub tag](https://hub.docker.com/r/gogs/gogs/tags) for the current release to be created automatically.
 - [ ] Push another Docker image tag as `<MAJOR>.<MINOR>`, e.g. `0.12`.
 - [ ] Compile and pack binaries (all prefixed with `gogs_<MAJOR>.<MINOR>.<PATCH>_`, e.g. `gogs_0.12.0_`):
@@ -34,5 +34,5 @@ On develop branch:
 - [ ] Create a new release topic on [Gogs Discussion](https://discuss.gogs.io/c/announcements/5).
 - [ ] Send out release announcement emails via [Mailchimp](https://mailchimp.com/).
 - [ ] Publish a new release article on [OSChina](http://my.oschina.net/Obahua/admin/releases).
-- [ ] Update the [hard-coded version](https://github.com/gogs/gogs/blob/master/gogs.go#L21) to the new develop version, e.g. `0.12.0+dev` -> `0.13.0+dev`.
+- [ ] Update the [hard-coded version](https://github.com/gogs/gogs/blob/main/gogs.go#L21) to the new develop version, e.g. `0.12.0+dev` -> `0.13.0+dev`.
 - [ ] Run `make legacy` to identify deprecated code that is aimed to be removed in current develop version.

+ 3 - 3
docs/dev/release/issue_template_patch_release.md

@@ -2,7 +2,7 @@
 
 On develop branch:
 
-- [ ] Update [CHANGELOG](https://github.com/gogs/gogs/blob/master/CHANGELOG.md) to include entries for the current patch release.
+- [ ] Update [CHANGELOG](https://github.com/gogs/gogs/blob/main/CHANGELOG.md) to include entries for the current patch release.
 
 ## During release
 
@@ -11,8 +11,8 @@ On release branch:
 - [ ] Cherry-pick commits from develop branch:
 	- [ ] _link to the commit_
 - [ ] Wait for GitHub Actions to complete and no failed jobs.
-- [ ] Update the [hard-coded version](https://github.com/gogs/gogs/blob/master/gogs.go#L21) to the current release, e.g. `0.12.0` -> `0.12.1`.
-- [ ] Publish a new [GitHub release](https://github.com/gogs/gogs/releases) with entries from [CHANGELOG](https://github.com/gogs/gogs/blob/master/CHANGELOG.md) for the current patch release and all previous releases with same minor version.
+- [ ] Update the [hard-coded version](https://github.com/gogs/gogs/blob/main/gogs.go#L21) to the current release, e.g. `0.12.0` -> `0.12.1`.
+- [ ] Publish a new [GitHub release](https://github.com/gogs/gogs/releases) with entries from [CHANGELOG](https://github.com/gogs/gogs/blob/main/CHANGELOG.md) for the current patch release and all previous releases with same minor version.
 - [ ] Update all previous GitHub releases with same minor version with the warning:
     ```
     **ℹ️ Heads up! There is a new patch release [0.12.1](https://github.com/gogs/gogs/releases/tag/v0.12.1) available, we recommend directly installing or upgrading to that version.**

File diff suppressed because it is too large
+ 2 - 2
internal/assets/templates/templates_gen.go


+ 8 - 8
templates/home.tmpl

@@ -17,7 +17,7 @@
 					<i class="octicon octicon-flame"></i> Einfach zu installieren
 				</h1>
 				<p class="large">
-					Starte einfach <a target="_blank" rel="noopener noreferrer" href="https://gogs.io/docs/installation/install_from_binary.html">die Anwendung</a> für deine Plattform. Gogs gibt es auch für <a target="_blank" rel="noopener noreferrer" href="https://github.com/gogits/gogs/tree/master/docker">Docker</a>, <a target="_blank" rel="noopener noreferrer" href="https://github.com/geerlingguy/ansible-vagrant-examples/tree/master/gogs">Vagrant</a> oder als <a target="_blank" rel="noopener noreferrer" href="https://gogs.io/docs/installation/install_from_packages.html">Installationspaket</a>.
+					Starte einfach <a target="_blank" rel="noopener noreferrer" href="https://gogs.io/docs/installation/install_from_binary.html">die Anwendung</a> für deine Plattform. Gogs gibt es auch für <a target="_blank" rel="noopener noreferrer" href="https://github.com/gogs/gogs/tree/main/docker">Docker</a>, <a target="_blank" rel="noopener noreferrer" href="https://github.com/geerlingguy/ansible-vagrant-examples/tree/master/gogs">Vagrant</a> oder als <a target="_blank" rel="noopener noreferrer" href="https://gogs.io/docs/installation/install_from_packages.html">Installationspaket</a>.
 				</p>
 			</div>
 			<div class="eight wide center column">
@@ -54,7 +54,7 @@
 					<i class="octicon octicon-flame"></i> 易安装
 				</h1>
 				<p class="large">
-					您除了可以根据操作系统平台通过 <a target="_blank" rel="noopener noreferrer" href="https://gogs.io/docs/installation/install_from_binary.html">二进制运行</a>,还可以通过 <a target="_blank" rel="noopener noreferrer" href="https://github.com/gogits/gogs/tree/master/docker">Docker</a> 或 <a target="_blank" rel="noopener noreferrer" href="https://github.com/geerlingguy/ansible-vagrant-examples/tree/master/gogs">Vagrant</a>,以及 <a target="_blank" rel="noopener noreferrer" href="https://gogs.io/docs/installation/install_from_packages.html">包管理</a> 安装。
+					您除了可以根据操作系统平台通过 <a target="_blank" rel="noopener noreferrer" href="https://gogs.io/docs/installation/install_from_binary.html">二进制运行</a>,还可以通过 <a target="_blank" rel="noopener noreferrer" href="https://github.com/gogs/gogs/tree/main/docker">Docker</a> 或 <a target="_blank" rel="noopener noreferrer" href="https://github.com/geerlingguy/ansible-vagrant-examples/tree/master/gogs">Vagrant</a>,以及 <a target="_blank" rel="noopener noreferrer" href="https://gogs.io/docs/installation/install_from_packages.html">包管理</a> 安装。
 				</p>
 			</div>
 			<div class="eight wide center column">
@@ -92,7 +92,7 @@
 				</h1>
 				<p class="large">
 				    Il suffit de <a target="_blank" rel="noopener noreferrer" href="https://gogs.io/docs/installation/install_from_binary.html">lancer l'exécutable</a> correspondant à votre système.
-                    Ou d'utiliser Gogs avec <a target="_blank" rel="noopener noreferrer" href="https://github.com/gogits/gogs/tree/master/docker">Docker</a> ou
+                    Ou d'utiliser Gogs avec <a target="_blank" rel="noopener noreferrer" href="https://github.com/gogs/gogs/tree/main/docker">Docker</a> ou
                     <a target="_blank" rel="noopener noreferrer" href="https://github.com/geerlingguy/ansible-vagrant-examples/tree/master/gogs">Vagrant</a>
                     ou en l'installant depuis un <a target="_blank" rel="noopener noreferrer" href="https://gogs.io/docs/installation/install_from_packages.html">package</a>.
 				</p>
@@ -131,7 +131,7 @@
 					<i class="octicon octicon-flame"></i> Fácil de instalar
 				</h1>
 				<p class="large">
-					Simplemente <a target="_blank" rel="noopener noreferrer" href="https://gogs.io/docs/installation/install_from_binary.html">arranca el binario</a> para tu plataforma. O usa Gogs con <a target="_blank" rel="noopener noreferrer" href="https://github.com/gogits/gogs/tree/master/docker">Docker</a> o <a target="_blank" rel="noopener noreferrer" href="https://github.com/geerlingguy/ansible-vagrant-examples/tree/master/gogs">Vagrant</a>, o utilice el <a target="_blank" rel="noopener noreferrer" href="https://gogs.io/docs/installation/install_from_packages.html">paquete</a>.
+					Simplemente <a target="_blank" rel="noopener noreferrer" href="https://gogs.io/docs/installation/install_from_binary.html">arranca el binario</a> para tu plataforma. O usa Gogs con <a target="_blank" rel="noopener noreferrer" href="https://github.com/gogs/gogs/tree/main/docker">Docker</a> o <a target="_blank" rel="noopener noreferrer" href="https://github.com/geerlingguy/ansible-vagrant-examples/tree/master/gogs">Vagrant</a>, o utilice el <a target="_blank" rel="noopener noreferrer" href="https://gogs.io/docs/installation/install_from_packages.html">paquete</a>.
 				</p>
 			</div>
 			<div class="eight wide center column">
@@ -168,7 +168,7 @@
 					<i class="octicon octicon-flame"></i> Fácil de instalar
 				</h1>
 				<p class="large">
-					Simplesmente <a target="_blank" rel="noopener noreferrer" href="https://gogs.io/docs/installation/install_from_binary.html">rode o executável</a> para o seu sistema operacional. Ou obtenha o Gogs com o <a target="_blank" rel="noopener noreferrer" href="https://github.com/gogits/gogs/tree/master/docker">Docker</a> ou <a target="_blank" rel="noopener noreferrer" href="https://github.com/geerlingguy/ansible-vagrant-examples/tree/master/gogs">Vagrant</a>, ou baixe o <a target="_blank" rel="noopener noreferrer" href="https://gogs.io/docs/installation/install_from_packages.html">pacote</a>.
+					Simplesmente <a target="_blank" rel="noopener noreferrer" href="https://gogs.io/docs/installation/install_from_binary.html">rode o executável</a> para o seu sistema operacional. Ou obtenha o Gogs com o <a target="_blank" rel="noopener noreferrer" href="https://github.com/gogs/gogs/tree/main/docker">Docker</a> ou <a target="_blank" rel="noopener noreferrer" href="https://github.com/geerlingguy/ansible-vagrant-examples/tree/master/gogs">Vagrant</a>, ou baixe o <a target="_blank" rel="noopener noreferrer" href="https://gogs.io/docs/installation/install_from_packages.html">pacote</a>.
 				</p>
 			</div>
 			<div class="eight wide center column">
@@ -205,7 +205,7 @@
 					<i class="octicon octicon-flame"></i> Простой в установке
 				</h1>
 				<p class="large">
-					Просто <a target="_blank" rel="noopener noreferrer" href="https://gogs.io/docs/installation/install_from_binary.html">запустите исполняемый файл</a> для вашей платформы. Используйте Gogs с <a target="_blank" rel="noopener noreferrer" href="https://github.com/gogits/gogs/tree/master/docker">Docker</a> или <a target="_blank" rel="noopener noreferrer" href="https://github.com/geerlingguy/ansible-vagrant-examples/tree/master/gogs">Vagrant</a>, или загрузите <a target="_blank" rel="noopener noreferrer" href="https://gogs.io/docs/installation/install_from_packages.html">пакет</a>.
+					Просто <a target="_blank" rel="noopener noreferrer" href="https://gogs.io/docs/installation/install_from_binary.html">запустите исполняемый файл</a> для вашей платформы. Используйте Gogs с <a target="_blank" rel="noopener noreferrer" href="https://github.com/gogs/gogs/tree/main/docker">Docker</a> или <a target="_blank" rel="noopener noreferrer" href="https://github.com/geerlingguy/ansible-vagrant-examples/tree/master/gogs">Vagrant</a>, или загрузите <a target="_blank" rel="noopener noreferrer" href="https://gogs.io/docs/installation/install_from_packages.html">пакет</a>.
 				</p>
 			</div>
 			<div class="eight wide center column">
@@ -242,7 +242,7 @@
 					<i class="octicon octicon-flame"></i> Простий у втановленні
 				</h1>
 				<p class="large">
-					Просто <a target="_blank" rel="noopener noreferrer" href="https://gogs.io/docs/installation/install_from_binary.html">запустіть виконуваний файл</a> для вашої платформи. Використовуйте Gogs с <a target="_blank" rel="noopener noreferrer" href="https://github.com/gogits/gogs/tree/master/docker">Docker</a> або <a target="_blank" rel="noopener noreferrer" href="https://github.com/geerlingguy/ansible-vagrant-examples/tree/master/gogs">Vagrant</a>, або завантажте <a target="_blank" rel="noopener noreferrer" href="https://gogs.io/docs/installation/install_from_packages.html">пакет</a>.
+					Просто <a target="_blank" rel="noopener noreferrer" href="https://gogs.io/docs/installation/install_from_binary.html">запустіть виконуваний файл</a> для вашої платформи. Використовуйте Gogs с <a target="_blank" rel="noopener noreferrer" href="https://github.com/gogs/gogs/tree/main/docker">Docker</a> або <a target="_blank" rel="noopener noreferrer" href="https://github.com/geerlingguy/ansible-vagrant-examples/tree/master/gogs">Vagrant</a>, або завантажте <a target="_blank" rel="noopener noreferrer" href="https://gogs.io/docs/installation/install_from_packages.html">пакет</a>.
 				</p>
 			</div>
 			<div class="eight wide center column">
@@ -279,7 +279,7 @@
 					<i class="octicon octicon-flame"></i> Easy to install
 				</h1>
 				<p class="large">
-					Simply <a target="_blank" rel="noopener noreferrer" href="https://gogs.io/docs/installation/install_from_binary.html">run the binary</a> for your platform. Or ship Gogs with <a target="_blank" rel="noopener noreferrer" href="https://github.com/gogits/gogs/tree/master/docker">Docker</a> or <a target="_blank" rel="noopener noreferrer" href="https://github.com/geerlingguy/ansible-vagrant-examples/tree/master/gogs">Vagrant</a>, or get it <a target="_blank" rel="noopener noreferrer" href="https://gogs.io/docs/installation/install_from_packages.html">packaged</a>.
+					Simply <a target="_blank" rel="noopener noreferrer" href="https://gogs.io/docs/installation/install_from_binary.html">run the binary</a> for your platform. Or ship Gogs with <a target="_blank" rel="noopener noreferrer" href="https://github.com/gogs/gogs/tree/main/docker">Docker</a> or <a target="_blank" rel="noopener noreferrer" href="https://github.com/geerlingguy/ansible-vagrant-examples/tree/master/gogs">Vagrant</a>, or get it <a target="_blank" rel="noopener noreferrer" href="https://gogs.io/docs/installation/install_from_packages.html">packaged</a>.
 				</p>
 			</div>
 			<div class="eight wide center column">

+ 1 - 1
templates/install.tmpl

@@ -8,7 +8,7 @@
 			<div class="ui attached segment">
 				{{template "base/alert" .}}
 
-				<p>{{.i18n.Tr "install.docker_helper" "https://github.com/gogits/gogs/tree/master/docker" | Safe}}</p>
+				<p>{{.i18n.Tr "install.docker_helper" "https://github.com/gogs/gogs/tree/main/docker" | Safe}}</p>
 
 				<form class="ui form" action="{{AppSubURL}}/install" method="post">
 					<!-- Dtabase Settings -->

Some files were not shown because too many files changed in this diff