From f51a7b6b15d758eabdbaba406056a39c326ff196 Mon Sep 17 00:00:00 2001
From: wyv <wyv@google.com>
Date: Thu, 7 Apr 2022 04:40:59 -0700
Subject: [PATCH] Add GitHub issue templates

- Changes the existing issue template to use forms (demo: https://github.com/Wyverald/playground/issues/new/choose)
- Adds a new issue template for the release issue

PiperOrigin-RevId: 440071996
---
 .github/ISSUE_TEMPLATE/bug_report.yml      | 56 ++++++++++++++++++++++
 .github/ISSUE_TEMPLATE/feature_request.yml | 55 +++++++++++++++++++++
 .github/ISSUE_TEMPLATE/release.md          | 32 +++++++++++++
 ISSUE_TEMPLATE.md                          | 50 -------------------
 4 files changed, 143 insertions(+), 50 deletions(-)
 create mode 100644 .github/ISSUE_TEMPLATE/bug_report.yml
 create mode 100644 .github/ISSUE_TEMPLATE/feature_request.yml
 create mode 100644 .github/ISSUE_TEMPLATE/release.md
 delete mode 100644 ISSUE_TEMPLATE.md

diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml
new file mode 100644
index 00000000000000..87bccd7a83fefb
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/bug_report.yml
@@ -0,0 +1,56 @@
+name: Bug Report
+description: File a bug report
+body:
+  - type: markdown
+    attributes:
+      value: >
+        **Attention:** if this is a _question_ about how to build / test / query / deploy using
+        Bazel, or a _discussion starter_, send it to bazel-discuss@googlegroups.com or discuss on
+        [Bazel Slack](https://slack.bazel.build/) instead!
+  - type: textarea
+    id: desc
+    attributes:
+      label: >
+        Description of the bug:
+  - type: textarea
+    id: repro
+    attributes:
+      label: >
+        What's the simplest, easiest way to reproduce this bug? Please provide a minimal example if
+        possible.
+  - type: input
+    id: os
+    attributes:
+      label: >
+        Which operating system are you running Bazel on?
+  - type: input
+    id: version
+    attributes:
+      label: >
+        What is the output of `bazel info release`?
+  - type: textarea
+    id: version-follow-up
+    attributes:
+      label: >
+        If `bazel info release` returns `development version` or `(@non-git)`, tell us how you built
+        Bazel.
+  - type: textarea
+    id: source
+    attributes:
+      label: >
+        What's the output of `git remote get-url origin; git rev-parse master; git rev-parse HEAD` ?
+      render: text
+  - type: textarea
+    id: relevant-info
+    attributes:
+      label: Have you found anything relevant by searching the web?
+      description: >
+        Places to look:
+
+         * StackOverflow: http://stackoverflow.com/questions/tagged/bazel
+         * GitHub issues: https://github.com/bazelbuild/bazel/issues
+         * email threads on https://groups.google.com/forum/#!forum/bazel-discuss
+  - type: textarea
+    id: extras
+    attributes:
+      label: Any other information, logs, or outputs that you want to share?
diff --git a/.github/ISSUE_TEMPLATE/feature_request.yml b/.github/ISSUE_TEMPLATE/feature_request.yml
new file mode 100644
index 00000000000000..1a0848d29d0c99
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/feature_request.yml
@@ -0,0 +1,55 @@
+name: Feature Request
+description: Suggest a new feature
+body:
+  - type: markdown
+    attributes:
+      value: >
+        **Attention:** if this is a _question_ about how to build / test / query / deploy using
+        Bazel, or a _discussion starter_, send it to bazel-discuss@googlegroups.com or discuss on
+        [Bazel Slack](https://slack.bazel.build/) instead!
+  - type: textarea
+    id: desc
+    attributes:
+      label: >
+        Description of the feature request:
+  - type: textarea
+    id: problem
+    attributes:
+      label: >
+        Wwhat underlying problem are you trying to solve with this feature?
+  - type: input
+    id: os
+    attributes:
+      label: >
+        Which operating system are you running Bazel on?
+  - type: input
+    id: version
+    attributes:
+      label: >
+        What is the output of `bazel info release`?
+  - type: textarea
+    id: version-follow-up
+    attributes:
+      label: >
+        If `bazel info release` returns `development version` or `(@non-git)`, tell us how you built
+        Bazel.
+  - type: textarea
+    id: source
+    attributes:
+      label: >
+        What's the output of `git remote get-url origin; git rev-parse master; git rev-parse HEAD` ?
+      render: text
+  - type: textarea
+    id: relevant-info
+    attributes:
+      label: Have you found anything relevant by searching the web?
+      description: >
+        Places to look:
+
+         * StackOverflow: http://stackoverflow.com/questions/tagged/bazel
+         * GitHub issues: https://github.com/bazelbuild/bazel/issues
+         * email threads on https://groups.google.com/forum/#!forum/bazel-discuss
+  - type: textarea
+    id: extras
+    attributes:
+      label: Any other information, logs, or outputs that you want to share?
diff --git a/.github/ISSUE_TEMPLATE/release.md b/.github/ISSUE_TEMPLATE/release.md
new file mode 100644
index 00000000000000..8615c438fdff66
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/release.md
@@ -0,0 +1,32 @@
+---
+name: 'Release issue (For release managers only)'
+about: Communicate the progress of a release
+title: 'Release X.Y - $MONTH $YEAR'
+labels: ['release','team-OSS','P1','type: process']
+
+---
+
+# Status of Bazel X.Y
+
+<!-- The first item is only needed for major releases (X.0.0) -->
+-   Target baseline: [date]
+-   Expected release date: [date]
+-   [List of release blockers](link-to-milestone)
+
+To report a release-blocking bug, please add a comment with the text `@bazel-io flag` to the issue. A release manager will triage it and add it to the milestone.
+
+To cherry-pick a mainline commit into X.Y, simply send a PR against the `release-X.Y.0` branch.
+
+Task list:
+
+<!-- The first three items are only needed for major releases (X.0.0) -->
+
+-   [ ] Pick release baseline:
+-   [ ] Create release candidate:
+-   [ ] Check downstream projects:
+-   [ ] [Create draft release announcement](https://docs.google.com/document/d/1wDvulLlj4NAlPZamdlEVFORks3YXJonCjyuQMUQEmB0/edit)
+-   [ ] Send for review the release announcement PR:
+-   [ ] Push the release, notify package maintainers:
+-   [ ] Update the documentation
+-   [ ] Push the blog post
+-   [ ] Update the [release page](https://github.com/bazelbuild/bazel/releases/)
diff --git a/ISSUE_TEMPLATE.md b/ISSUE_TEMPLATE.md
deleted file mode 100644
index 480c7f9face2d6..00000000000000
--- a/ISSUE_TEMPLATE.md
+++ /dev/null
@@ -1,50 +0,0 @@
-<!--
-ATTENTION! Please read and follow:
-- if this is a _question_ about how to build / test / query / deploy using Bazel, or a _discussion starter_, send it to bazel-discuss@googlegroups.com
-- if this is a _bug_ or _feature request_, fill the form below as best as you can.
--->
-
-### Description of the problem / feature request:
-
-> Replace this line with your answer.
-
-### Feature requests: what underlying problem are you trying to solve with this feature?
-
-> Replace this line with your answer.
-
-### Bugs: what's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.
-
-> Replace this line with your answer.
-
-### What operating system are you running Bazel on?
-
-> Replace this line with your answer.
-
-### What's the output of `bazel info release`?
-
-> Replace this line with your answer.
-
-### If `bazel info release` returns "development version" or "(@non-git)", tell us how you built Bazel.
-
-> Replace this line with your answer.
-
-### What's the output of `git remote get-url origin ; git rev-parse master ; git rev-parse HEAD` ?
-
-> Replace this line with your answer.
-
-###  Have you found anything relevant by searching the web?
-
-> Replace this line with your answer.
-
-<!--
-Places to look:
- - StackOverflow: http://stackoverflow.com/questions/tagged/bazel
- - GitHub issues: https://github.com/bazelbuild/bazel/issues
- - email threads on https://groups.google.com/forum/#!forum/bazel-discuss
--->
-
-### Any other information, logs, or outputs that you want to share?
-
-> Replace this line with your answer.
-
-<!-- If the files are large, upload as attachment or provide link. -->