diff --git a/.github/labeler.yml b/.github/labeler.yml deleted file mode 100644 index 925d161..0000000 --- a/.github/labeler.yml +++ /dev/null @@ -1,34 +0,0 @@ -# Config file for pr-auto-label workflow - -# enable auto-labeler on issues, prs, or both. -enable: - prs: true - -# Labels is an object where: -# - keys are labels -# - values are objects of { include: [ pattern ], exclude: [ pattern ] } -# - pattern must be a valid regex, and is applied globally to -# title + description of issues and/or prs (see enabled config above) -# - 'include' patterns will associate a label if any of these patterns match -# - 'exclude' patterns will ignore this label if any of these patterns match -labels: - 'kind/BUGFIX': - include: - - '/kind (fix|bugfix)' - exclude: [] - 'kind/ENHANCEMENT': - include: - - '/kind enhancement' - exclude: [] - 'kind/FEATURE': - include: - - '/kind (feat|feature)' - exclude: [] - 'kind/CHANGE': - include: - - '/kind change' - exclude: [] - 'release-note-none': - include: - - '/kind (none|NONE|release-note-none|release-notes-none)' - exclude: [] diff --git a/.github/pull-request-template.md b/.github/pull-request-template.md deleted file mode 100644 index e737933..0000000 --- a/.github/pull-request-template.md +++ /dev/null @@ -1,4 +0,0 @@ - -### Describe your PR diff --git a/.github/workflows/pr-auto-label.yml b/.github/workflows/pr-auto-label.yml deleted file mode 100644 index 46a892b..0000000 --- a/.github/workflows/pr-auto-label.yml +++ /dev/null @@ -1,62 +0,0 @@ ---- -name: Changelog automation - -on: - pull_request_target: - types: [opened, edited] - -permissions: - contents: read # the config file - pull-requests: write # for labeling pull requests (on: pull_request_target or on: pull_request) - statuses: write # to generate status - checks: write # to generate status - -jobs: - changelog-automation: - name: Changelog automation - runs-on: ubuntu-latest - steps: - - name: Remove old PR labels - uses: mondeja/remove-labels-gh-action@v2.0.0 - with: - token: ${{ secrets.GITHUB_TOKEN }} - labels: | - kind/BUGFIX - kind/ENHANCEMENT - kind/FEATURE - kind/CHANGE - release-note-none - - name: Add label to PR - id: labeler - uses: jimschubert/labeler-action@v1 - with: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} -# Adjust the configuration in /.github/labeler.yml - - - name: Verify Label - id: preview_label_check - uses: docker://agilepathway/pull-request-label-checker:latest - with: - any_of: kind/BUGFIX,kind/ENHANCEMENT,kind/FEATURE,kind/CHANGE,release-note-none - repo_token: ${{ secrets.GITHUB_TOKEN }} - allow_failure: true - - name: Comment on Label Check Failure - uses: thollander/actions-comment-pull-request@v2.5.0 - if: steps.preview_label_check.outputs.label_check == 'failure' - with: - message: | - PR body does not contain a valid type of change. Please refer to [CONTRIBUTING.md](https://github.com/prometheus/client_golang/blob/main/CONTRIBUTING.md#how-to-write-a-pr-description) for more information. - comment_tag: labelfailure - mode: recreate - - name: Remove Label Check Failure Comment - uses: thollander/actions-comment-pull-request@v2.5.0 - if: steps.preview_label_check.outputs.label_check == 'success' - with: - message: | - PR body contains a valid type of change. - comment_tag: labelfailure - mode: delete - create_if_not_exists: false - - name: Exit on Failure - if: steps.preview_label_check.outputs.label_check == 'failure' - run: exit 1 diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 10fdcee..abc101b 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -20,55 +20,3 @@ Prometheus uses GitHub to manage reviews of pull requests. Environments](http://peter.bourgon.org/go-in-production/#formatting-and-style). * Be sure to sign off on the [DCO](https://github.com/probot/dco#how-it-works) - -## How to write a PR description - -### Describe your PR - -In this section, provide a clear and concise description of what your PR does. This helps reviewers understand the purpose and context of your changes. - -### What type of PR is this? - -Indicate the type of PR by adding one of the following options: - -- `/kind fix` -- `/kind bugfix` -- `/kind enhancement` -- `/kind feature` -- `/kind feat` -- `/kind change` -- `/kind release-note-none` - -If this change should not appear in the changelog, use `/kind release-note-none`. - -Example 1: -``` - ### What type of PR is this? - /kind feature -``` - -Example 2: -``` - ### What type of PR is this? - /kind release-note-none -``` - -### Changelog Entry - -Include a brief summary of your change for the changelog. This helps users understand what has been modified, added, or fixed in the project. If your change should not appear in the changelog, write `NONE`. Make sure to add only user-facing changes. - -Example 1: -``` - ### Changelog Entry - ```release-note - api: Switch to POST for `LabelNames`. - ``` -``` - -Example 2: -``` - ### Changelog Entry - ```release-note - NONE - ``` -```