diff --git a/.github/label-commenter-config.yml b/.github/label-commenter-config.yml index 4bc573e4..254b2b07 100644 --- a/.github/label-commenter-config.yml +++ b/.github/label-commenter-config.yml @@ -1,6 +1,6 @@ --- labels: - - name: kind:incomplete-template + - name: incomplete-template labeled: issue: body: | @@ -9,7 +9,7 @@ labels: locking: lock lock_reason: resolved - - name: kind:support + - name: support labeled: issue: body: | @@ -22,7 +22,7 @@ labels: - [GitHub Discussions](https://github.com/k8s-at-home/organization/discussions) action: close - - name: kind:incomplete-docs + - name: incomplete-docs labeled: pr: body: | @@ -33,17 +33,3 @@ labels: - `version` in `Chart.yaml` has been updated per [semver](http://semver.org/) - The `artifacthub.io/changes` chart annotation contains a summary of the updates for this new version. ([Artifact Hub documentation](https://artifacthub.io/docs/topics/annotations/helm/#supported-annotations)) - [Documentation strings](https://github.com/norwoodj/helm-docs#valuesyaml-metadata) have been added to the keys in `values.yaml`. - - Afterwards you can run `./hack/gen-helm-docs.sh stable ` again to update the chart's `README.md` file. - - - name: kind:incorrect-title - labeled: - pr: - body: | - :wave: @{{ pull_request.user.login }}, thanks for taking the time to submit this PR. 🙏🏽 - - We have noticed that the PR title does not adhere to our desired format. - Could you please make sure that it follows the pattern `[] `? - Example: `[radarr] Update image version`. - - Thanks! diff --git a/.github/renovate.json5 b/.github/renovate.json5 index e5132263..6448eeed 100644 --- a/.github/renovate.json5 +++ b/.github/renovate.json5 @@ -34,23 +34,23 @@ "branchTopic": "{{{parentDir}}}-{{{depNameSanitized}}}-{{{newMajor}}}{{#if isPatch}}.{{{newMinor}}}{{/if}}.x{{#if isLockfileUpdate}}-lockfile{{/if}}", "updateTypes": ["major"], "bumpVersion": "major", - "labels": ["dependency/major"], + "labels": ["type/major"], "packageNames": ["common"], - "groupName": ["internal major dep"] + "groupName": ["common library major"] }, { "updateTypes": ["minor"], "bumpVersion": "minor", - "labels": ["dependency/minor"], + "labels": ["type/minor"], "packageNames": ["common"], - "groupName": ["internal minor dep"] + "groupName": ["common library minor"] }, { "updateTypes": ["patch"], "bumpVersion": "patch", - "labels": ["dependency/patch"], + "labels": ["type/patch"], "packageNames": ["common"], - "groupName": ["internal patch dep"] + "groupName": ["common library patch"] }, // // Other library deps @@ -60,7 +60,7 @@ "branchTopic": "{{{parentDir}}}-{{{depNameSanitized}}}-{{{newMajor}}}{{#if isPatch}}.{{{newMinor}}}{{/if}}.x{{#if isLockfileUpdate}}-lockfile{{/if}}", "updateTypes": ["major"], "bumpVersion": "major", - "labels": ["dependency/major"], + "labels": ["type/major"], "excludePackageNames": ["common"], "schedule": [ "every 3 months on the first day of the month" @@ -69,9 +69,9 @@ { "updateTypes": ["minor"], "bumpVersion": "minor", - "labels": ["dependency/minor"], + "labels": ["type/minor"], "excludePackageNames": ["common"], - "groupName": ["external minor dep"], + "groupName": ["external dependency minor"], "schedule": [ "every 2 months on the first day of the month" ] @@ -79,9 +79,9 @@ { "updateTypes": ["patch"], "bumpVersion": "patch", - "labels": ["dependency/patch"], + "labels": ["type/patch"], "excludePackageNames": ["common"], - "groupName": ["external patch dep"], + "groupName": ["external dependency patch"], "schedule": [ "every 1 months on the first day of the month" ] diff --git a/.github/workflows/charts-update-readme.yaml b/.github/workflows/charts-readme.yaml similarity index 100% rename from .github/workflows/charts-update-readme.yaml rename to .github/workflows/charts-readme.yaml diff --git a/.github/workflows/meta-label-pr-ci-status.yaml b/.github/workflows/meta-label-pr-ci-status.yaml index cdb8f34a..715ba7c9 100644 --- a/.github/workflows/meta-label-pr-ci-status.yaml +++ b/.github/workflows/meta-label-pr-ci-status.yaml @@ -13,9 +13,6 @@ jobs: name: Label CI status runs-on: ubuntu-latest steps: - - name: Checkout - uses: actions/checkout@v2 - - name: Generate Token uses: tibdex/github-app-token@v1 id: generate-token @@ -23,12 +20,18 @@ jobs: app_id: ${{ secrets.K8S_AT_HOME_APP_ID }} private_key: ${{ secrets.K8S_AT_HOME_APP_PRIVATE_KEY }} + - name: Checkout + uses: actions/checkout@v2 + with: + token: ${{ steps.generate-token.outputs.token }} + - name: Download workflow artifact uses: dawidd6/action-download-artifact@v2.11.0 with: github_token: ${{ steps.generate-token.outputs.token }} workflow: pr-validate.yaml name: pr_metadata + path: ./pr_metadata - name: Read the pr_number file id: pr_num_reader diff --git a/.github/workflows/metadata-label-commenter.yaml b/.github/workflows/metadata-label-commenter.yaml index c6f306cb..b9c3ebc4 100644 --- a/.github/workflows/metadata-label-commenter.yaml +++ b/.github/workflows/metadata-label-commenter.yaml @@ -1,38 +1,38 @@ -# --- -# name: "Metadata: Label Commenter" +--- +name: "Metadata: Label Commenter" -# on: -# issues: -# types: -# - labeled -# - unlabeled -# pull_request_target: -# types: -# - labeled -# - unlabeled +on: + issues: + types: + - labeled + - unlabeled + pull_request_target: + types: + - labeled + - unlabeled -# permissions: -# contents: read -# issues: write -# pull-requests: write +permissions: + contents: read + issues: write + pull-requests: write -# jobs: -# comment: -# name: Label commenter -# runs-on: ubuntu-20.04 -# steps: -# - name: Generate Token -# uses: tibdex/github-app-token@v1 -# id: generate-token -# with: -# app_id: ${{ secrets.K8S_AT_HOME_APP_ID }} -# private_key: ${{ secrets.K8S_AT_HOME_APP_PRIVATE_KEY }} +jobs: + comment: + name: Label commenter + runs-on: ubuntu-20.04 + steps: + - name: Generate Token + uses: tibdex/github-app-token@v1 + id: generate-token + with: + app_id: ${{ secrets.K8S_AT_HOME_APP_ID }} + private_key: ${{ secrets.K8S_AT_HOME_APP_PRIVATE_KEY }} -# - uses: actions/checkout@v2 -# with: -# token: ${{ steps.generate-token.outputs.token }} -# ref: master + - uses: actions/checkout@v2 + with: + token: ${{ steps.generate-token.outputs.token }} + ref: master -# - uses: peaceiris/actions-label-commenter@v1 -# with: -# github_token: ${{ steps.generate-token.outputs.token }} + - uses: peaceiris/actions-label-commenter@v1 + with: + github_token: ${{ steps.generate-token.outputs.token }} diff --git a/.github/workflows/metadata-label-issues-prs.yaml b/.github/workflows/metadata-label-issues-prs.yaml deleted file mode 100644 index 4e3668f9..00000000 --- a/.github/workflows/metadata-label-issues-prs.yaml +++ /dev/null @@ -1,72 +0,0 @@ -# --- -# name: "Metadata: Label issues and pull requests" - -# on: -# issues: -# types: -# - opened -# - edited -# - closed -# - reopened -# pull_request_target: -# types: -# - opened -# - edited -# - closed -# - reopened -# - ready_for_review -# - synchronize - -# jobs: -# label: -# name: Label issues and pull requests -# runs-on: ubuntu-20.04 -# steps: -# - name: Generate Token -# uses: tibdex/github-app-token@v1 -# id: generate-token -# with: -# app_id: ${{ secrets.K8S_AT_HOME_APP_ID }} -# private_key: ${{ secrets.K8S_AT_HOME_APP_PRIVATE_KEY }} - -# - uses: Videndum/label-mastermind@2.1.3 -# with: -# GITHUB_TOKEN: ${{ steps.generate-token.outputs.token }} -# configJSON: | -# { -# "releaseMastermind": { -# "labels": { -# "kind:incorrect-title": { -# "name": "kind:incorrect-title", -# "colour": "#ffb700", -# "description": "Incorrect title" -# } -# }, -# "runners": [ -# { -# "root": ".", -# "versioning": { -# "source": "milestones", -# "type": "other" -# }, -# "pr": { -# "labels": { -# "kind:incorrect-title": { -# "requires": 2, -# "conditions": [ -# { -# "type": "creatorMatches", -# "pattern": "^(?!renovate).+" -# }, -# { -# "type": "titleMatches", -# "pattern": "^(?!\\[[a-z0-9\\-]+\\]\\s.+).+" -# } -# ] -# } -# } -# } -# } -# ] -# } -# } diff --git a/.github/workflows/metadata-label-pr.yaml b/.github/workflows/metadata-label-pr.yaml new file mode 100644 index 00000000..105c4e2b --- /dev/null +++ b/.github/workflows/metadata-label-pr.yaml @@ -0,0 +1,39 @@ +--- +name: "Metadata: Label pull requests" + +on: + pull_request_target: + types: + - opened + - edited + - closed + - reopened + - ready_for_review + - synchronize + +jobs: + label-size: + name: Label Size + runs-on: ubuntu-latest + steps: + - name: Generate Token + uses: tibdex/github-app-token@v1 + id: generate-token + with: + app_id: ${{ secrets.K8S_AT_HOME_APP_ID }} + private_key: ${{ secrets.K8S_AT_HOME_APP_PRIVATE_KEY }} + + - name: Label Size + uses: pascalgn/size-label-action@v0.4.3 + env: + GITHUB_TOKEN: "${{ steps.generate-token.outputs.token }}" + with: + sizes: > + { + "0": "XS", + "20": "S", + "50": "M", + "200": "L", + "800": "XL", + "2000": "XXL" + } diff --git a/.github/workflows/pr-get-metadata.yaml b/.github/workflows/pr-metadata.yaml similarity index 100% rename from .github/workflows/pr-get-metadata.yaml rename to .github/workflows/pr-metadata.yaml diff --git a/.github/workflows/pr-validate.yaml b/.github/workflows/pr-validate.yaml index 54c42134..cebb881c 100644 --- a/.github/workflows/pr-validate.yaml +++ b/.github/workflows/pr-validate.yaml @@ -11,7 +11,7 @@ concurrency: jobs: pr-metadata: - uses: k8s-at-home/charts/.github/workflows/pr-get-metadata.yaml@master + uses: k8s-at-home/charts/.github/workflows/pr-metadata.yaml@master pre-commit-check: uses: k8s-at-home/charts/.github/workflows/pre-commit-check.yaml@master @@ -21,7 +21,7 @@ jobs: modifiedFiles: ${{ needs.pr-metadata.outputs.addedOrModifiedFiles }} charts-readme: - uses: k8s-at-home/charts/.github/workflows/charts-update-readme.yaml@master + uses: k8s-at-home/charts/.github/workflows/charts-readme.yaml@master needs: - pr-metadata - pre-commit-check