diff --git a/.github/pr-labeler.yml b/.github/pr-labeler.yml new file mode 100644 index 0000000000..3497f17c92 --- /dev/null +++ b/.github/pr-labeler.yml @@ -0,0 +1,4 @@ +feature: ['feature/*', 'feat/*'] +fix: fix/* +chore: chore/* +fixed-branch: fixed-branch-name diff --git a/.github/workflows/pr-labeler.yml b/.github/workflows/pr-labeler.yml new file mode 100644 index 0000000000..37c870fca0 --- /dev/null +++ b/.github/workflows/pr-labeler.yml @@ -0,0 +1,14 @@ +name: PR Labeler +on: + pull_request: + types: [opened] + +jobs: + pr-labeler: + runs-on: ubuntu-latest + steps: + - uses: TimonVS/pr-labeler-action@v3 + with: + configuration-path: .github/pr-labeler.yml # optional, .github/pr-labeler.yml is the default value + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index bdb6c94f0c..802eee1f36 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -32,8 +32,8 @@ All code changes to the master branch must be done via [pull requests](https://h 1. Create a new ticket or take a known ticket from [the issue list][monai issue list]. 1. Check if there's already a branch dedicated to the task. 1. If the task has not been taken, [create a new branch in your fork](https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/creating-a-pull-request-from-a-fork) -of the codebase named `[ticket_id]-[task_name]`. -For example, branch name `19-ci-pipeline-setup` corresponds to [issue #19](https://github.com/Project-MONAI/MONAI/issues/19). +of the codebase named `[category]/[ticket_id]-[task_name]`, where category is either `feature` or `fix`. +For example, branch name `feature/19-ci-pipeline-setup` corresponds to a new feature described in [issue #19](https://github.com/Project-MONAI/MONAI/issues/19). Ideally, the new branch should be based on the latest `master` branch. 1. Make changes to the branch ([use detailed commit messages if possible](https://chris.beams.io/posts/git-commit/)). If the changes introduce new features, make sure that you write [unit tests](#unit-testing). 1. [Create a new pull request](https://help.github.com/en/desktop/contributing-to-projects/creating-a-pull-request) from the task branch to the master branch, with detailed descriptions of the purpose of this pull request.