From ddb0cc96407b68c80520f09f31659c5e94377957 Mon Sep 17 00:00:00 2001 From: Jose Santorum Date: Fri, 11 Oct 2024 13:27:54 +0200 Subject: [PATCH] chore: add release-drafter gh action Signed-off-by: Jose Santorum --- .github/release-drafter.yml | 132 ++++++++++++++++++++++++++ .github/workflows/release-drafter.yml | 41 ++++++++ CONTRIBUTING.md | 70 ++++++++++++++ 3 files changed, 243 insertions(+) create mode 100644 .github/release-drafter.yml create mode 100644 .github/workflows/release-drafter.yml create mode 100644 CONTRIBUTING.md diff --git a/.github/release-drafter.yml b/.github/release-drafter.yml new file mode 100644 index 0000000..6bc044c --- /dev/null +++ b/.github/release-drafter.yml @@ -0,0 +1,132 @@ +category-template: '## $TITLE' +name-template: 'v$RESOLVED_VERSION' +tag-template: 'v$RESOLVED_VERSION' +tag-prefix: '' +version-template: $MAJOR.$MINOR.$PATCH +change-template: '* $TITLE (#$NUMBER) by @$AUTHOR' +change-title-escapes: '' +no-changes-template: 'No changes were made in this version. Stay tuned for upcoming updates!' +categories: + - title: '⚑ Breaking Changes' + labels: + - 'breaking-change' + - title: '🌟New features and non-breaking changes' + labels: + - 'feature' + - title: '🌟 Minor Changes' + labels: + - 'enhancement' + - title: 'πŸ“œ Documentation updates' + labels: + - 'documentation' + - title: 'πŸ› Bug and hot fixes' + labels: + - 'bug' + - 'bugfix' + - 'fix' + - title: 'πŸš’ Deprecations' + labels: + - 'deprecation' + - title: 'πŸ”§ Maintenance' + labels: + - 'chore' + - 'internal' + - title: 'πŸ“¦ Dependency updates' + collapse-after: 10 + labels: + - 'dependencies' +version-resolver: + major: + labels: + - 'major' + - 'breaking-change' + minor: + labels: + - 'minor' + - 'feature' + - 'enhancement' + - 'deprecation' + patch: + labels: + - 'patch' + - 'documentation' + - 'bug' + - 'bugfix' + - 'fix' + - 'chore' + - 'internal' + - 'dependencies' + default: patch +autolabeler: + - label: 'breaking-change' + branch: + - '/.*!:.*/' + - label: 'feature' + branch: + - '/feature\/.+/i' + - '/feat\/.+/i' + title: + - '/feature.*: /i' + - '/feat.*: /i' + - label: 'improvement' + branch: + - '/improvement\/.+/i' + title: + - '/improvement.*: /i' + - label: 'bug' + branch: + - '/fix\/.+/i' + - '/bugfix\/.+/i' + - '/bug\/.+/i' + - '/hotfix\/.+/i' + title: + - '/fix.*: /i' + - '/bugfix.*: /i' + - '/bug.*: /i' + - '/hotfix.*: /i' + - label: 'dependencies' + branch: + - '/dependabot\/.*/' + - label: 'documentation' + files: + - '*.md' + branch: + - '/docs{0,1}\/.+/' + title: + - '/docs.*: /i' + - label: 'deprecation' + branch: + - '/deprecation\/.+/i' + title: + - '/deprecation.*: .*/i' + + + - label: 'chore' + files: + - '*.md' + branch: + - '/docs{0,1}\/.+/' + - label: 'bug' + branch: + - '/fix\/.+/' + title: + - '/fix/i' + - label: 'enhancement' + branch: + - '/feature\/.+/' + body: + - '/JIRA-[0-9]{1,4}/' +exclude-labels: + - 'skip-changelog' +template: | + ## Summary + + **[Human readable summary of changes]** + + ## Changes + + $CHANGES + + ## This release was made possible by the following contributors: + + $CONTRIBUTORS diff --git a/.github/workflows/release-drafter.yml b/.github/workflows/release-drafter.yml new file mode 100644 index 0000000..aad01aa --- /dev/null +++ b/.github/workflows/release-drafter.yml @@ -0,0 +1,41 @@ +name: Release Drafter + +on: + push: + # branches to consider in the event; optional, defaults to all + branches: + - main + # pull_request event is required only for autolabeler + pull_request: + # Only following types are handled by the action, but one can default to all as well + types: [opened, reopened, synchronize] + # pull_request_target event is required for autolabeler to support PRs from forks + # pull_request_target: + # types: [opened, reopened, synchronize] + +permissions: + contents: read + +jobs: + update_release_draft: + permissions: + # write permission is required to create a github release + contents: write + # write permission is required for autolabeler + # otherwise, read permission is required at least + pull-requests: write + runs-on: ubuntu-latest + steps: + # (Optional) GitHub Enterprise requires GHE_HOST variable set + #- name: Set GHE_HOST + # run: | + # echo "GHE_HOST=${GITHUB_SERVER_URL##https:\/\/}" >> $GITHUB_ENV + + # Drafts your next Release notes as Pull Requests are merged into "master" + - uses: release-drafter/release-drafter@v6 + # (Optional) specify config name to use, relative to .github/. Default: release-drafter.yml + # with: + # config-name: my-config.yml + # disable-autolabeler: true + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..38d2eb1 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,70 @@ +# Contributing + +If you are interested in contributing to the project, your contributions will fall +into three categories: + +1. You want to report a bug, feature request, or documentation issue + - File an [issue](https://github.com/NVIDIA-Merlin/core/issues/new/choose) + describing what you encountered or what you want to see changed. + - The maintainers evaluate the issues and triage them, scheduling + them for a release. If you believe the issue needs priority attention + comment on the issue to notify the team. +2. You want to propose a new feature and implement it + - Post about your intended feature, and we shall discuss the design and + implementation. + - Once we agree that the plan looks good, go ahead and implement it, using + the [code contributions](#code-contributions) guide below. +3. You want to implement a feature or bug-fix for an outstanding issue + - Follow the [code contributions](#code-contributions) guide below. + - If you need more context on a particular issue, please ask and we shall + provide. + +## Code contributions + +### Your first issue + +1. Read the project's [README.md](https://github.com/NVIDIA-Merlin/Merlin/blob/stable/README.md) + to learn how to setup the development environment. +2. Find an issue to work on. The best way is to look for the + [good first issue](https://github.com/NVIDIA-Merlin/Merlin/issues?q=is%3Aissue+is%3Aopen+label%3A%22good+first+issue%22) + or [help wanted](https://github.com/NVIDIA-Merlin/Merlin/issues?q=is%3Aissue+is%3Aopen+label%3A%22help+wanted%22) labels. +3. Comment on the issue saying you are going to work on it. +4. Code! Make sure to update unit tests! +5. When done, [create your pull request](https://github.com/NVIDIA-Merlin/Merlin/compare). +6. Verify that CI passes all [status checks](https://help.github.com/articles/about-status-checks/). + Fix if needed. +7. Wait for other developers to review your code and update code as needed. +8. After your pull request reviewed and approved, a maintainer will merge your + pull request. + +Remember, if you are unsure about anything, don't hesitate to comment on issues +and ask for clarifications! + +## Label your PRs + +This repository uses the release-drafter action to draft and create our change log. + +Please add one of the following labels to your PR to specify the type of contribution +and help categorize the PR in our change log: + +- `breaking` -- The PR creates a breaking change to the API. +- `bug` -- The PR fixes a problem with the code. +- `feature` or `enhancement` -- The PR introduces a backward-compatible feature. +- `documentation` or `examples` -- The PR is an addition or update to documentation. +- `build`, `dependencies`, `chore`, or `ci` -- The PR is related to maintaining the + repository or the project. + +By default, an unlabeled PR is listed at the top of the change log and is not +grouped under a heading like *Features* that groups similar PRs. +Labeling the PRs so we can categorize them is preferred. + +If, for some reason, you do not believe your PR should be included in the change +log, you can add the `skip-changelog` label. +This label excludes the PR from the change log. + +For more information, see `.github/release-drafter.yml` in the repository +or go to . + +## Attribution + +Portions adopted from . \ No newline at end of file