From 8318df1da0f438983d82d77e1b3ae361da4bf9e4 Mon Sep 17 00:00:00 2001 From: Sudharaka Palamakumbura Date: Sun, 1 Nov 2020 19:10:36 -0800 Subject: [PATCH] feat: rename all instances of master to main (#255) This renames all instances of master to main Resolves https://github.com/jhipster/jhipster-online/issues/246 --- .github/workflows/github-ci.yml | 2 +- .github/workflows/release-drafter.yml | 4 ++-- CONTRIBUTING.md | 22 +++++++++---------- README.md | 8 +++---- .../online/service/GithubService.java | 2 +- .../online/service/GitlabService.java | 2 +- .../git-provider/git-provider.component.ts | 4 ++-- src/main/webapp/index.html | 2 +- 8 files changed, 23 insertions(+), 23 deletions(-) diff --git a/.github/workflows/github-ci.yml b/.github/workflows/github-ci.yml index 478fd9ee..a4733b5a 100644 --- a/.github/workflows/github-ci.yml +++ b/.github/workflows/github-ci.yml @@ -56,7 +56,7 @@ jobs: run: yarn test - name: Sonar analysis - if: github.repository == 'jhipster/jhipster-online' && github.ref == 'refs/heads/master' + if: github.repository == 'jhipster/jhipster-online' && github.ref == 'refs/heads/main' run: | ./mvnw -ntp --batch-mode initialize org.jacoco:jacoco-maven-plugin:prepare-agent sonar:sonar \ -Dsonar.host.url=https://sonarcloud.io \ diff --git a/.github/workflows/release-drafter.yml b/.github/workflows/release-drafter.yml index 2c30bcdb..4ddf5a2e 100644 --- a/.github/workflows/release-drafter.yml +++ b/.github/workflows/release-drafter.yml @@ -4,13 +4,13 @@ on: push: # branches to consider in the event; optional, defaults to all branches: - - master + - main jobs: update_release_draft: runs-on: ubuntu-latest steps: - # Drafts your next Release notes as Pull Requests are merged into "master" + # Drafts your next Release notes as Pull Requests are merged into "main" - uses: release-drafter/release-drafter@v5 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 14ff22d3..fecf5d92 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -64,7 +64,7 @@ Before you submit your pull request consider the following guidelines: - Make your changes in a new git branch ```shell - git checkout -b my-fix-branch master + git checkout -b my-fix-branch main ``` - Create your patch, **including appropriate test cases**. @@ -96,7 +96,7 @@ Before you submit your pull request consider the following guidelines: git push origin my-fix-branch ``` -- In GitHub, send a pull request to `jhipster/jhipster-online:master`. +- In GitHub, send a pull request to `jhipster/jhipster-online:main`. - If we suggest changes then - Make the required updates. @@ -104,7 +104,7 @@ Before you submit your pull request consider the following guidelines: - Rebase your branch and force push to your GitHub repository (this will update your Pull Request): ```shell - git rebase master -i + git rebase main -i git push -f ``` @@ -112,18 +112,18 @@ That's it! Thank you for your contribution! #### Resolving merge conflicts ("This branch has conflicts that must be resolved") -Sometimes your PR will have merge conflicts with the upstream repository's master branch. There are several ways to solve this but if not done correctly this can end up as a true nightmare. So here is one method that works quite well. +Sometimes your PR will have merge conflicts with the upstream repository's main branch. There are several ways to solve this but if not done correctly this can end up as a true nightmare. So here is one method that works quite well. -- First, fetch the latest information from the master +- First, fetch the latest information from the main ```shell git fetch upstream ``` -- Rebase your branch against the upstream/master +- Rebase your branch against the upstream/main ```shell - git rebase upstream/master + git rebase upstream/main ``` - Git will stop rebasing at the first merge conflict and indicate which file is in conflict. Edit the file, resolve the conflict then @@ -152,10 +152,10 @@ from the main (upstream) repository: git push origin --delete my-fix-branch ``` -- Check out the master branch: +- Check out the main branch: ```shell - git checkout master -f + git checkout main -f ``` - Delete the local branch: @@ -164,10 +164,10 @@ from the main (upstream) repository: git branch -D my-fix-branch ``` -- Update your master with the latest upstream version: +- Update your main with the latest upstream version: ```shell - git pull --ff upstream master + git pull --ff upstream main ``` ## Coding Rules diff --git a/README.md b/README.md index 1813862d..91aa0e52 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ JHipster Online is a Web application that allows to generate [JHipster applications](https://www.jhipster.tech/) without installing JHipster on your machine. -This is an Open Source project ([Apache 2 license](https://github.com/jhipster/jhipster-online/blob/master/LICENSE.txt)) +This is an Open Source project ([Apache 2 license](https://github.com/jhipster/jhipster-online/blob/main/LICENSE.txt)) that powers the [https://start.jhipster.tech/](https://start.jhipster.tech/) website. You can use [https://start.jhipster.tech/](https://start.jhipster.tech/) for free, but if you find a bug or need a specific @@ -187,7 +187,7 @@ docker-compose -f src/main/docker/app.yml up -d - The project can be deployed to [GAE flexible environment](https://cloud.google.com/appengine/docs/flexible/) by simply [creating a tagged release](https://github.com/jhipster/jhipster-online/releases). -- Creating a new release triggers the [deploy.yml GitHub Actions workflow](https://github.com/jhipster/jhipster-online/blob/master/.github/workflows/deploy.yml). +- Creating a new release triggers the [deploy.yml GitHub Actions workflow](https://github.com/jhipster/jhipster-online/blob/main/.github/workflows/deploy.yml). - The above workflow includes a Docker build and pushes the image to [Google Container Registry](https://cloud.google.com/container-registry/). [Cloud Monitoring](https://cloud.google.com/monitoring) and [Cloud Logging](https://cloud.google.com/logging) are used for obtaining application logs and monitoring. @@ -199,7 +199,7 @@ of the [JHipster project](https://github.com/jhipster/generator-jhipster). ### If you have an issue, a bug or a feature request -Please follow our [contribution guide](https://github.com/jhipster/jhipster-online/blob/master/CONTRIBUTING.md). +Please follow our [contribution guide](https://github.com/jhipster/jhipster-online/blob/main/CONTRIBUTING.md). ### If you have a question or need help @@ -208,7 +208,7 @@ You should [post it on Stack Overflow using the "jhipster" tag](https://stackove ### Code of conduct We have the same code of conduct as the main JHipster project: -[JHipster code of conduct](https://github.com/jhipster/jhipster-online/blob/master/CODE_OF_CONDUCT.md). +[JHipster code of conduct](https://github.com/jhipster/jhipster-online/blob/main/CODE_OF_CONDUCT.md). [github-actions-jhonline-image]: https://github.com/jhipster/jhipster-online/workflows/Application%20CI/badge.svg [github-actions-url]: https://github.com/jhipster/jhipster-online/actions diff --git a/src/main/java/io/github/jhipster/online/service/GithubService.java b/src/main/java/io/github/jhipster/online/service/GithubService.java index f53bb162..8a365614 100644 --- a/src/main/java/io/github/jhipster/online/service/GithubService.java +++ b/src/main/java/io/github/jhipster/online/service/GithubService.java @@ -206,7 +206,7 @@ public int createPullRequest(User user, String organization, String repositoryNa GitHub gitHub = this.getConnection(user); int number = gitHub .getRepository(organization + "/" + repositoryName) - .createPullRequest(title, branchName, "master", body) + .createPullRequest(title, branchName, "main", body) .getNumber(); log.info("Pull Request created!"); diff --git a/src/main/java/io/github/jhipster/online/service/GitlabService.java b/src/main/java/io/github/jhipster/online/service/GitlabService.java index 96a28097..2eab3975 100644 --- a/src/main/java/io/github/jhipster/online/service/GitlabService.java +++ b/src/main/java/io/github/jhipster/online/service/GitlabService.java @@ -265,7 +265,7 @@ public int createPullRequest(User user, String group, String repositoryName, Str log.info("Creating Merge Request on repository {} / {}", group, repositoryName); GitlabAPI gitlab = getConnection(user); int number = gitlab.getProject(group, repositoryName).getId(); - GitlabMergeRequest mergeRequest = gitlab.createMergeRequest(number, branchName, "master", null, title); + GitlabMergeRequest mergeRequest = gitlab.createMergeRequest(number, branchName, "main", null, title); log.info("Merge Request created!"); return mergeRequest.getIid(); } diff --git a/src/main/webapp/app/shared/git-provider/git-provider.component.ts b/src/main/webapp/app/shared/git-provider/git-provider.component.ts index d43b8ee4..435ad2b8 100644 --- a/src/main/webapp/app/shared/git-provider/git-provider.component.ts +++ b/src/main/webapp/app/shared/git-provider/git-provider.component.ts @@ -62,7 +62,7 @@ export class JhiGitProviderAlertComponent implements OnInit { this.warningMessage = ` To configure Continuous Integration/Continuous Deployment on your ${this.displayedGitProvider} project, you must authorize JHipster Online to access your ${this.displayedGitProvider} account.`; this.infoMessage = ` will access your project's ${this.displayedGitProvider} repository and create a new branch - with Continuous Integration configuration. You can then decide if you want to merge this branch into your master branch.`; + with Continuous Integration configuration. You can then decide if you want to merge this branch into your main branch.`; } else if (this.tab === 'generate-application') { this.warningMessage = ` To generate your application on ${this.displayedGitProvider}, you must authorize JHipster Online to access your ${this.displayedGitProvider} account. You will only be able to download your application as a Zip file.`; @@ -73,7 +73,7 @@ export class JhiGitProviderAlertComponent implements OnInit { this.warningMessage = ` To apply a JDL Model on a ${this.displayedGitProvider} project, you must authorize JHipster Online to access your ${this.displayedGitProvider} account.`; this.infoMessage = ` will access your project's ${this.displayedGitProvider} repository and create a new branch with this model. - You can then decide if you want to merge this branch into your master branch.`; + You can then decide if you want to merge this branch into your main branch.`; } } diff --git a/src/main/webapp/index.html b/src/main/webapp/index.html index 54d194f1..78b9785e 100644 --- a/src/main/webapp/index.html +++ b/src/main/webapp/index.html @@ -54,7 +54,7 @@

If you have a question on how to use JHipster

If you have a bug or a feature request

- First read our contributing guidelines. + First read our contributing guidelines.

Then, fill a ticket on our bug tracker, we'll be happy to resolve your issue!