From d9124caa037fdf20511a131d909feaa54d0dc058 Mon Sep 17 00:00:00 2001 From: ab510 <46869762+ab510@users.noreply.github.com> Date: Mon, 19 Oct 2020 14:12:51 +0400 Subject: [PATCH] docs: delete duplicate doc files which have been moved to asyncapi/.github (#454) * Delete git-workflow.md * Delete repository-settings.md --- documents/git-workflow.md | 84 -------------------------------- documents/repository-settings.md | 83 ------------------------------- 2 files changed, 167 deletions(-) delete mode 100644 documents/git-workflow.md delete mode 100644 documents/repository-settings.md diff --git a/documents/git-workflow.md b/documents/git-workflow.md deleted file mode 100644 index ad4856788..000000000 --- a/documents/git-workflow.md +++ /dev/null @@ -1,84 +0,0 @@ -This document is the best practice guide that contains the rules to follow when working with AsyncAPI repositories. - -### Basic rules - -Each contributor and maintainer in AsyncAPI must follow this workflow: - -* Work on forked repositories. -* Create branches on the fork and avoid working directly on the `master` branch. - -## Prepare the fork - -A fork is a copy of the repository from which you raise pull requests to propose changes to the original repository. -The unified AsyncAPI contribution workflow that bases on forks allows both the members of the AsyncAPI organization and the external contributors to contribute code and content through the same process. This keeps the main repositories branches clean as contributors create branches only on the forked repositories. - -## Configure your fork - -The document refers to the original repository as the upstream repository and to the forked repository as the origin repository. We assume you already have a fork of the upstream and you `git clone` it already. - -### Working on a Fork on local - -> If you perform such configuration for the first time, it is recommended to do it manually to understand all the steps. Next time you do it you can write a script for it or use something like [this](https://gist.github.com/derberg/87319e9c486e4a6c9bef5b629ab0d386) - -Configure a `remote` repository that points to the upstream repository. This allows you to synchronize changes you make on the fork with the original repository. - -In the terminal, navigate to the location of your fork and perform the following steps: - -1. Run the `git remote -v` command to list the current configured remote repository for your fork. -The result is as follows: - ``` - origin https://github.com/{your-username}/{your-fork}.git (fetch) - origin https://github.com/{your-username}/{your-fork}.git (push) - ``` - See the example: - ``` - origin https://github.com/i000000/asyncapi.git (fetch) - origin https://github.com/i000000/asyncapi.git (push) - ``` - -2. Specify a new remote upstream repository to synchronize with the fork: - ``` - git remote add upstream https://github.com/{original-owner}/{original-repository}.git - ``` - See the example: - ``` - git remote add upstream https://github.com/asyncapi/asyncapi.git - ``` -3. Run the `git fetch upstream master` command to fetch all branches. -4. Set up the local `master` branch to track the remote `master` branch from the upstream repository: - ``` - git branch -u upstream/master master - ``` - -Now, each time you rebase or check out the `master` branch, you refer to the `master` branch of the upstream repository. In other words, when you create a branch from local up-to-date `master` means creating a branch from latest upstream `master`. - -To verify that your local `master` branch points to the `upstream/master`, run the `git branch -vv` command. The result is similar to the following: -``` -* master c2226e0 [upstream/master] Update the README.md document -``` - -### Working on a Fork in GitHub UI - -In case you are a contributor who suggests minor changes using GitHub UI, it is recommended to use a [Pull bot](https://probot.github.io/apps/pull). This bot keeps your fork up to date by creating and merging a pull request with latest changes into the `master `branch of your fork. - -## Start Contributing - -After you set up your fork, start contributing code and content. - -Follow these steps: - -1. Create a branch on your fork. - -2. Commit changes. Always provide clear commit messages to track commit changes easier. - -3. Push the changes to the remote forked repository. - - >**NOTE:** Before you push local changes, make sure you are on the branch you are currently working on. Do not push any changes from the `master` branch. - - If you push local changes from the terminal to your remote fork for the first time, use this command: - ``` - git push -u origin {branch-name} - ``` - Use the `git push` command to push any further commits made on your local branch to a remote repository. - -4. Create a pull request from the branch of your forked repository to the `master` branch of the upstream repository and wait for the maintainers' review. diff --git a/documents/repository-settings.md b/documents/repository-settings.md deleted file mode 100644 index 5a643fbbc..000000000 --- a/documents/repository-settings.md +++ /dev/null @@ -1,83 +0,0 @@ -All repositories in `asyncapi` organizations should be similar in structure, settings, and restrictions. Follow these guidelines to adjust settings of a new repository created in one of these organizations. - -## Adjust repository options - -Under the repository name, choose the **Settings** tab. The **Options** view opens as the default one in the left menu. - -1. Scroll down to the **Features** section and clear these options: - - Wikis - - Projects - -Make sure **Sponsorships** option is selected and `open_collective: asyncapi` is provided. - -2. Go to the **Merge button** section and clear these options: - - Allow merge commits - - Allow rebase merging - -Leave only the **Allow squash merging** option selected. This option combines all commits into one before merging the changes into the `master` branch. - -3. Make sure option **Automatically delete head branches** is selected - -## Add basic GitHub Actions configurations - -Create `.github/workflows` directory and the following configurations: - -* Handling of stale issues and PRs should be stored in `stale-issues-prs.yml` file with the following content: - ``` - name: Manage stale issues and PRs - - on: - schedule: - - cron: "0 0 * * *" - - jobs: - stale: - runs-on: ubuntu-latest - steps: - - uses: actions/stale@v1.1.0 - with: - repo-token: ${{ secrets.GITHUB_TOKEN }} - stale-issue-message: | - This issue has been automatically marked as stale because it has not had recent activity :sleeping: - It will be closed in 30 days if no further activity occurs. To unstale this issue, add a comment with detailed explanation. - Thank you for your contributions :heart: - stale-pr-message: | - This pull request has been automatically marked as stale because it has not had recent activity :sleeping: - It will be closed in 30 days if no further activity occurs. To unstale this pull request, add a comment with detailed explanation. - Thank you for your contributions :heart: - days-before-stale: 60 - days-before-close: 30 - stale-issue-label: stale - stale-pr-label: stale - exempt-issue-label: keep-open - exempt-pr-label: keep-open - ``` - -* Welcome message for first-time contributors should be stored in `welcome-first-time-contrib.yml` file with the following content: - ``` - name: Welcome first time contributors - - on: - pull_request: - types: - - opened - issues: - types: - - opened - - jobs: - welcome: - runs-on: ubuntu-latest - steps: - - uses: actions/first-interaction@v1.0.0 - with: - repo-token: ${{ secrets.GITHUB_TOKEN }} - issue-message: | - Welcome to AsyncAPI. Thanks a lot for reporting your first issue. - - Keep in mind there are also other channels you can use to interact with AsyncAPI community. For more details check out [this issue](https://github.com/asyncapi/asyncapi/issues/115). - pr-message: | - Welcome to AsyncAPI. Thanks a lot for creating your first pull request. - - Keep in mind there are also other channels you can use to interact with AsyncAPI community. For more details check out [this issue](https://github.com/asyncapi/asyncapi/issues/115). - ```