diff --git a/.github/README.md b/.github/README.md new file mode 100644 index 0000000000..aeecd4edab --- /dev/null +++ b/.github/README.md @@ -0,0 +1,40 @@ +# Consul GitHub Configuration + +## Overview + +This file helps track the configuration of the `.github/` folder. + +## Issue Templates + +Issue templates are stored in `.github/ISSUE_TEMPLATE/` and follow the +[documentation](https://docs.github.com/en/github/building-a-strong-community/using-templates-to-encourage-useful-issues-and-pull-requests). +The `.github/ISSUE_TEMPLATE/config.yml` controls links out to other support +resources. + +## GitHub Actions + +GitHub Actions provides a pluggable architecture for creating simple automation. +An Action is made of at least two files, the `workflow` file and a config file. +All workflows are stored in `.github/workflows/`. Configuration files are stored +one directory higher, in `.github/`. The workflow and the configuration file +should be named the same when created. Create unique and clear names for these +files. + +### Issue Labeler + +Issues are labeled with +[RegEx Labeler](https://github.com/marketplace/actions/regex-issue-labeler). +This action supports simple regexes, and most string parsing. + +### PR Labeler + +PRs are labeled with [labeler](https://github.com/actions/labeler) action. +This supports glob parsing so that labels can be applied to changed files. + +## Considered Actions + +- [super-labeler-action](https://github.com/IvanFon/super-labeler-action) is an action that holds all the configuration in a single file. In setting up a basic configuration with 60 labels, the JSON config became ~1200 lines. This solution may be feaseable in the future, but wouldn't seem as scaleable. This also creates a single point of failure for the entire labeling system. + +- [actions-label-commenter](https://github.com/peaceiris/actions-label-commenter) is an action that just responds based on tags, rather than tagging them as they come in. This would be helpful for responses for reoccuring types of messages. + +- [top-issues-labeler](https://github.com/marketplace/actions/top-issues-labeler) labels the top ten issues based on number of :+1: 's on an inssue. diff --git a/.github/issue-labeler.yml b/.github/issue-labeler.yml new file mode 100644 index 0000000000..6afddd8387 --- /dev/null +++ b/.github/issue-labeler.yml @@ -0,0 +1,90 @@ +# archived/webui: +# backport/1.6: +# backport/1.7: +# backport/1.8: +# beta/1.8: +# blocks-release: +# crash: +# do-not-merge: +# help-wanted: +# needs-discussion: +# needs-investigation: +# post-beta: +# pr/dependencies: +# pr/needs-rebase: +# pr/needs-tests: +theme/acls: + - '(acl|ACL)' +# theme/agent-cache: +# theme/api: +theme/catalog: + - '(catalog|Catalog)' +theme/certificates: + - '(certificate|CA|Certificate\sAuthority)' +theme/cli: + - '(command-line|commandline|cli|command)' +theme/config: + - '(configuration_files|options#configuration_files)' +theme/connect: + - '(Connect|connect|service\smesh|mesh|proxy|gateway)' +theme/consul-nomad: + - '(nomad|Nomad)' +theme/consul-vault: + - '(vault|Vault)' +# theme/contributing: +theme/dns: + - '(dns|DNS)' +theme/envoy/xds: + - '(envoy|xds|xDS|XDS|Envoy)' +theme/federation-usability: + - '(WAN|wan|wan_fed|federation|fed)' +# theme/go-modules: +theme/health-checks: + - '(health-check|healthcheck|health\scheck)' +theme/ingress-gw: + - '(ingress|ingress-gateway|Ingress)' +# thementernal-cleanup: +theme/internals: + - '(raft|RAFT|SERF|serf|lifeguard|Lifeguard|gossip)' +theme/kubernetes: + - '(kubernetes|k8s|helm)' +theme/mesh-gw: + - 'mesh' +# theme/operator-usability: +theme/packaging: + - '(nix|Nix|RPM|rpm|DEB|deb|repository|systemd|upstart|Upstart|SystemD|brew|homebrew|choco|chocolatey)' +theme/performance: + - '(performance|requests\sper\ssecond)' +theme/service-metadata: + - '(meta-data|meta)' +theme/streaming: + - '(stream|streaming)' +theme/telemetry: + - '(circonis|statsd|dogstatsd|datadog|DataDog|prometheus|Prometheus|metric|metrics|trace|tracing)' +theme/terminating-gw: + - 'terminating' +theme/testing: + - '(unit\stest|functional\stest|integration\stest|e2e|E2E)' +theme/tls: + - '(mtls|mTLS|tls|TLS)' +theme/ui: + - '(ui|browser|chrome|firefox|IE|ie|Chrome)' +theme/windows: + - '(windows|Windows|Microsoft|microsoft)' +# thinking: +# type/bug: +type/ci: + - '(circle|circleci|CircleCI)' +# type/crash: +type/docs: + - '(docs\/|docs|consul\.io)' +# type/docs-cherrypick: +type/enhancement: + - '(new\sfeature|feature|feature\srequest)' +# type/good-first-issue: +# type/question: +# type/umbrella-☂️: +# version/0.8.3: +# waiting-pr-merge: +# waiting-reply: +# waiting-reply-🤖: diff --git a/.github/pr-labeler.yml b/.github/pr-labeler.yml new file mode 100644 index 0000000000..884ef06cb6 --- /dev/null +++ b/.github/pr-labeler.yml @@ -0,0 +1,83 @@ +# backport/1.6: +# backport/1.7: +# backport/1.8: +# beta/1.8: +# blocks-release: +# crash: +# do-not-merge: +# help-wanted: +# needs-discussion: +# needs-investigation: +# post-beta: +pr/dependencies: + - vendor/**/* + - go.* +# pr/needs-rebase: +# pr/needs-tests: +theme/acls: + - acl/**/* +theme/agent-cache: + - agent/cache/**/* +theme/api: + - api/**/* +theme/catalog: + - agent/catalog/**/* +theme/certificates: + - tlsutil/**/* +theme/cli: + - command/**/* +theme/config: + - agent/config/**/* +theme/connect: + - connect/**/* + - agent/connect/**/* +# theme/consul-nomad: +# theme/consul-vault: +theme/contributing: + - .github/**/* +theme/dns: + - dns/**/* +theme/envoy/xds: + - agent/xds/**/* +# theme/federation-usability: +theme/health-checks: + - agent/health* + - api/health* +# theme/ingress-gw: +# theme/internal-cleanup: +theme/internals: + - lib/**/* + - types/**/* +# theme/kubernetes: +# theme/mesh-gw: +# theme/operator-usability: +# theme/performance: +# theme/service-metadata: +# theme/streaming: +theme/telemetry: + - logging/**/* +# theme/terminating-gw: +theme/testing: + - ./*test*/**/* +theme/tls: + - tlsutil/**/* +theme/ui: + - ui-v2/**/* +# theme/windows: +# thinking: +# type/bug: +type/ci: + - .circleci/* +# type/crash: +type/docs: + - website/**/* +type/docs-cherrypick: + - website/**/* +# type/enhancement: +# type/good-first-issue: +# type/question: +# type/umbrella-☂️: +# version/0.8.3: +# waiting-pr-merge: +# waiting-reply: +# waiting-reply-🤖: diff --git a/.github/workflows/issue-labeler.yml b/.github/workflows/issue-labeler.yml new file mode 100644 index 0000000000..7b5abd4382 --- /dev/null +++ b/.github/workflows/issue-labeler.yml @@ -0,0 +1,15 @@ +name: "Issue Labeler" +on: + issues: + types: [opened, edited] + +jobs: + triage: + runs-on: ubuntu-latest + steps: + - uses: github/issue-labeler@v2.2 + with: + repo-token: "${{ secrets.GITHUB_TOKEN }}" + configuration-path: .github/issue-labeler.yml + not-before: "2020-09-14T08:23:00Z" + enable-versioned-regex: 0 diff --git a/.github/workflows/pr-labeler.yml b/.github/workflows/pr-labeler.yml new file mode 100644 index 0000000000..3f0317bedc --- /dev/null +++ b/.github/workflows/pr-labeler.yml @@ -0,0 +1,13 @@ +name: "Pull Request Labeler" +on: +- pull_request_target + +jobs: + triage: + runs-on: ubuntu-latest + steps: + - uses: actions/labeler@main + with: + repo-token: "${{ secrets.GITHUB_TOKEN }}" + configuration-path: .github/pr-labeler.yml + sync-labels: false diff --git a/contributing/README.md b/contributing/README.md index 13894394a5..440b5826be 100644 --- a/contributing/README.md +++ b/contributing/README.md @@ -1,21 +1,21 @@ -# Contributing to Consul - -See [our contributing guide](../.github/CONTRIBUTING.md) to get started. - -This directory contains other helpful resources like checklists for making -certain common types of changes. - -## Checklists - -See the `checklist-*` files in this dir to see of there is a checklist that -applies to a change you wish to make. The most common one is a change to -Consul's configuration file which has a lot more steps and subtlety than might -first appear so please use the checklist! - -We recommend copying the raw Markdown lists into a local file or gist while you -work and checking tasks as you complete them (by filling in `[ ]` with `[x]`). -You can then paste the list in the PR description when you post it indicating -the steps you've already done. If you want to post an initial draft PR before -the list is complete, please still include the list as is so reviewers can see -progress. You can then check the list off on the PR description directly in -GitHub's UI after pushing the relevant fixes up. \ No newline at end of file +# Contributing to Consul + +See [our contributing guide](../.github/CONTRIBUTING.md) to get started. + +This directory contains other helpful resources like checklists for making +certain common types of changes. + +## Checklists + +See the `checklist-*` files in this dir to see of there is a checklist that +applies to a change you wish to make. The most common one is a change to +Consul's configuration file which has a lot more steps and subtlety than might +first appear so please use the checklist! + +We recommend copying the raw Markdown lists into a local file or gist while you +work and checking tasks as you complete them (by filling in `[ ]` with `[x]`). +You can then paste the list in the PR description when you post it indicating +the steps you've already done. If you want to post an initial draft PR before +the list is complete, please still include the list as is so reviewers can see +progress. You can then check the list off on the PR description directly in +GitHub's UI after pushing the relevant fixes up.