diff --git a/.github/label-commenter-config.yml b/.github/label-commenter-config.yml new file mode 100644 index 00000000000..ec8613d8c57 --- /dev/null +++ b/.github/label-commenter-config.yml @@ -0,0 +1,35 @@ +--- +labels: + - name: incomplete-template + labeled: + issue: + body: | + :wave: @{{ issue.user.login }}, please follow the template provided. + action: close + locking: lock + lock_reason: resolved + + - name: support + labeled: + issue: + body: | + :wave: @{{ issue.user.login }}, we use the issue tracker exclusively + for bug reports and feature requests. However, this issue appears + to be a support request. Please use our support channels + to get help. + - [Docs](https://docs.k8s-at-home.com/) + - [Discord](https://discord.gg/sTMX7Vh) + - [GitHub Discussions](https://github.com/k8s-at-home/organization/discussions) + action: close + + - name: incomplete-docs + labeled: + pr: + body: | + :wave: @{{ pull_request.user.login }}, thanks for taking the time to submit this PR. 🙏🏽 + + We have noticed that the chart documentation has not been completely updated for this PR. + Could you please make sure that the following items have been updated: + - `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. See [Artifact Hub documentation](https://artifacthub.io/docs/topics/annotations/helm/#supported-annotations) for more info. + - [Documentation strings](https://github.com/norwoodj/helm-docs#valuesyaml-metadata) have been added to the keys in `values.yaml`. diff --git a/.github/stale.yml b/.github/stale.yml new file mode 100644 index 00000000000..616be956c3f --- /dev/null +++ b/.github/stale.yml @@ -0,0 +1,32 @@ +# Configuration for probot-stale - https://github.com/probot/stale + +# Number of days of inactivity before an Issue or Pull Request becomes stale +daysUntilStale: 45 + +# Number of days of inactivity before a stale Issue or Pull Request is closed. +daysUntilClose: 5 + +# Issues or Pull Requests with these labels will never be considered stale. Set to `[]` to disable +exemptLabels: +- on-hold +- pinned + +# Label to use when marking as stale +staleLabel: stale + +issues: + # Comment to post when marking as stale. Set to `false` to disable + markComment: > + This Issue has been automatically marked as "stale" because it has not had recent activity (for 45 days). It will be closed if no further activity occurs. Thanks for the feedback. + # Comment to post when closing a stale Issue or Pull Request. + closeComment: > + Due to the lack of activity in the last 5 days since it was marked as "stale", we proceed to close this Issue. Do not hesitate to reopen it later if necessary. +pulls: + # Comment to post when marking as stale. Set to `false` to disable + markComment: > + This Pull Request has been automatically marked as "stale" because it has not had recent activity (for 45 days). It will be closed if no further activity occurs. Thank you for your contribution. + # Comment to post when closing a stale Issue or Pull Request. + closeComment: > + Due to the lack of activity in the last 5 days since it was marked as "stale", we proceed to close this Pull Request. Do not hesitate to reopen it later if necessary. +# Limit the number of actions per hour, from 1-30. Default is 30 +limitPerRun: 30 diff --git a/.github/workflows/metadata-label-commenter.yaml b/.github/workflows/metadata-label-commenter.yaml new file mode 100644 index 00000000000..168a041aa5f --- /dev/null +++ b/.github/workflows/metadata-label-commenter.yaml @@ -0,0 +1,32 @@ +--- +name: "Metadata: Label Commenter" + +on: + workflow_dispatch: + issues: + types: + - labeled + - unlabeled + pull_request_target: + types: + - labeled + - unlabeled + +permissions: + contents: read + issues: write + pull-requests: write + +jobs: + comment: + name: Label commenter + runs-on: ubuntu-20.04 + steps: + - uses: actions/checkout@v3 + with: + token: ${{ secrets.BOT_TOKEN }} + ref: master + + - uses: peaceiris/actions-label-commenter@v1 + with: + github_token: ${{ secrets.BOT_TOKEN }} diff --git a/.github/workflows/metadata-label-pr.yaml b/.github/workflows/metadata-label-pr.yaml new file mode 100644 index 00000000000..12cb7138e14 --- /dev/null +++ b/.github/workflows/metadata-label-pr.yaml @@ -0,0 +1,33 @@ +--- +name: "Metadata: Label pull requests" + +on: + workflow_dispatch: + pull_request_target: + types: + - opened + - edited + - closed + - reopened + - ready_for_review + - synchronize + +jobs: + label-size: + name: Label Size + runs-on: ubuntu-latest + steps: + - name: Label Size + uses: pascalgn/size-label-action@v0.4.3 + env: + GITHUB_TOKEN: "${{ secrets.BOT_TOKEN }}" + with: + sizes: > + { + "0": "XS", + "20": "S", + "50": "M", + "200": "L", + "800": "XL", + "2000": "XXL" + } diff --git a/.github/workflows/schedule-sync-labels.yaml b/.github/workflows/schedule-sync-labels.yaml new file mode 100644 index 00000000000..001877c309d --- /dev/null +++ b/.github/workflows/schedule-sync-labels.yaml @@ -0,0 +1,25 @@ +--- +name: "Schedule: Sync labels" + +on: # yamllint disable-line rule:truthy + workflow_dispatch: + schedule: + - cron: "0 * * * *" + +jobs: + labels: + name: Sync Labels + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + with: + token: ${{ secrets.BOT_TOKEN }} + + - name: Sync Labels + uses: EndBug/label-sync@v2 + with: + config-file: | + https://raw.githubusercontent.com/truecharts/.github/main/.github/labels.yaml + token: "${{ secrets.BOT_TOKEN }}" + delete-other-labels: true diff --git a/.github/workflows/stale.yaml b/.github/workflows/stale.yaml new file mode 100644 index 00000000000..fb649a1487f --- /dev/null +++ b/.github/workflows/stale.yaml @@ -0,0 +1,38 @@ +--- +name: "Mark or close stale issues and PRs" +on: + workflow_dispatch: + schedule: + # Run the stalebot every day at 8pm UTC + - cron: "00 20 * * *" + +jobs: + stale: + runs-on: ubuntu-20.04 + steps: + - name: Check for stale issues and PRs + uses: actions/stale@v5 + with: + repo-token: ${{ secrets.BOT_TOKEN }} + days-before-issue-stale: 180 + days-before-pr-stale: 180 + days-before-close: 14 + days-before-pr-close: 14 + stale-issue-message: > + This issue has been automatically marked as stale because it has not had recent activity. + It will be closed in two weeks if no further activity occurs. + Thank you for your contributions. + stale-pr-message: > + This pull request has been automatically marked as stale because it has not had + recent activity. It will be closed in two weeks if no further activity occurs. + Thank you for your contributions. + close-issue-message: > + This issue has been automatically closed due to inactivity. + Please re-open if this still requires investigation. + close-pr-message: > + This pull request has been automatically closed due to inactivity. + Please re-open if these changes are still required. + stale-pr-label: "stale" + stale-issue-label: "stale" + exempt-issue-labels: "keepalive" + exempt-pr-labels: "keepalive"