feat: rename master branch

This commit is contained in:
yanglbme 2020-11-23 09:18:16 +08:00
parent aaa12b715c
commit affac4b0e7
5 changed files with 8 additions and 7 deletions

View File

@ -14,5 +14,5 @@ jobs:
with:
github_token: ${{ github.token }}
source_ref: ${{ github.ref }}
target_branch: 'master'
target_branch: 'main'
commit_message_template: '[Automated] Merged {source_ref} into {target_branch}'

View File

@ -4,7 +4,7 @@ on:
pull_request:
push:
branches:
- master
- main
jobs:
prettier:

View File

@ -2,7 +2,7 @@ name: Sync
on:
push:
branches: [ master ]
branches: [ main ]
jobs:
build:
@ -23,3 +23,4 @@ jobs:
gitee-username: yanglbme
gitee-password: ${{ secrets.GITEE_PASSWORD }}
gitee-repo: doocs/advanced-java
branch: main

View File

@ -2,14 +2,14 @@
[![actions status](https://github.com/doocs/advanced-java/workflows/Sync/badge.svg)](https://github.com/doocs/advanced-java/actions?query=workflow%3ASync)
[![actions status](https://github.com/doocs/advanced-java/workflows/Prettier/badge.svg)](https://github.com/doocs/advanced-java/actions?query=workflow%3APrettier)
[![license](https://badgen.net/github/license/doocs/advanced-java?color=green)](https://github.com/doocs/advanced-java/blob/master/LICENSE)
[![license](https://badgen.net/github/license/doocs/advanced-java?color=green)](./LICENSE)
[![PRs Welcome](https://badgen.net/badge/PRs/welcome/green)](http://makeapullrequest.com)
[![doocs](https://badgen.net/badge/organization/join%20us/green)](https://doocs.github.io/#/?id=how-to-join)
[![github](https://badgen.net/badge/⭐/GitHub/blue)](https://github.com/doocs/advanced-java)
[![gitee](https://badgen.net/badge/⭐/Gitee/blue)](https://gitee.com/doocs/advanced-java)
[![stars](https://badgen.net/github/stars/doocs/advanced-java)](https://github.com/doocs/advanced-java/stargazers)
[![forks](https://badgen.net/github/forks/doocs/advanced-java)](https://github.com/doocs/advanced-java/network/members)
[![contributors](https://badgen.net/github/contributors/doocs/advanced-java)](https://github.com/doocs/advanced-java/tree/master/docs/from-readers#contributors)
[![contributors](https://badgen.net/github/contributors/doocs/advanced-java)](./docs/from-readers#contributors)
[![issues](https://badgen.net/github/open-issues/doocs/advanced-java)](https://github.com/doocs/advanced-java/issues)
[![original](https://badgen.net/badge/original/%E4%B8%AD%E5%8D%8E%E7%9F%B3%E6%9D%89/red)](https://github.com/doocs/advanced-java)
[![notice](https://badgen.net/badge/notice/%E7%BB%B4%E6%9D%83%E8%A1%8C%E5%8A%A8/red)](./docs/extra-page/rights-defending-action.md)

View File

@ -105,10 +105,10 @@
if (/githubusercontent\.com/.test(vm.route.file)) {
url = vm.route.file
.replace("raw.githubusercontent.com", "github.com")
.replace(/\/master/, "/blob/master");
.replace(/\/main/, "/blob/main");
} else {
url =
"https://github.com/doocs/advanced-java/blob/master/" +
"https://github.com/doocs/advanced-java/blob/main/" +
vm.route.file;
}