Skip to content

Commit

Permalink
feat: rename all instances of master to main (jhipster#255)
Browse files Browse the repository at this point in the history
This renames all instances of master to main

Resolves jhipster#246
  • Loading branch information
SudharakaP authored Nov 2, 2020
1 parent ef1346e commit 8318df1
Show file tree
Hide file tree
Showing 8 changed files with 23 additions and 23 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/github-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release-drafter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
22 changes: 11 additions & 11 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -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**.
Expand Down Expand Up @@ -96,34 +96,34 @@ 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.
- Re-run the JHipster Online tests on your sample generated project to ensure tests are still passing.
- 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
```

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
Expand Down Expand Up @@ -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:
Expand All @@ -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
```

## <a name="rules"></a> Coding Rules
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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.
Expand All @@ -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

Expand All @@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -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!");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.`;
Expand All @@ -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.`;
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/main/webapp/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ <h3>If you have a question on how to use JHipster</h3>

<h3>If you have a bug or a feature request</h3>
<p>
First read our <a href="https://github.com/jhipster/generator-jhipster/blob/master/CONTRIBUTING.md" target="_blank" rel="noopener noreferrer">contributing guidelines</a>.
First read our <a href="https://github.com/jhipster/generator-jhipster/blob/main/CONTRIBUTING.md" target="_blank" rel="noopener noreferrer">contributing guidelines</a>.
</p>
<p>
Then, fill a ticket on our <a href="https://github.com/jhipster/generator-jhipster/issues/new/choose" target="_blank" rel="noopener noreferrer">bug tracker</a>, we'll be happy to resolve your issue!
Expand Down

0 comments on commit 8318df1

Please sign in to comment.