Debian Codegraph @

HOW_WE_USE_GITHUB.md

raw
1 <!-- edit this in https://github.com/conda/infrastructure -->
2 # How We Use GitHub
3
4 <!-- absolute URLs -->
5 [conda-org]: https://github.com/conda
6
7 [project-refinement]: https://github.com/orgs/conda/projects/22/views/14
8 [project-backlog]: https://github.com/orgs/conda/projects/22/views/2
9 [project-current-sprint]: https://github.com/orgs/conda/projects/22/views/10
10 [project-review]: https://github.com/orgs/conda/projects/16
11
12 [docs-toc]: https://github.blog/changelog/2021-04-13-table-of-contents-support-in-markdown-files/
13 [docs-saved-reply]: https://docs.github.com/en/get-started/writing-on-github/working-with-saved-replies/creating-a-saved-reply
14
15 [infrastructure]: https://github.com/conda/infrastructure
16 [workflow-sync]: https://github.com/conda/infrastructure/blob/main/.github/workflows/sync.yml
17 [labels-global]: https://github.com/conda/infrastructure/blob/main/.github/global.yml
18
19 <!-- relative URLs -->
20 [workflow-cla]: https://github.com/conda/conda-package-streaming/blob/main/.github/workflows/cla.yml
21 [workflow-issues]: https://github.com/conda/conda-package-streaming/blob/main/.github/workflows/issues.yml
22 [workflow-labels]: https://github.com/conda/conda-package-streaming/blob/main/.github/workflows/labels.yml
23 [workflow-lock]: https://github.com/conda/conda-package-streaming/blob/main/.github/workflows/lock.yml
24 [workflow-project]: https://github.com/conda/conda-package-streaming/blob/main/.github/workflows/project.yml
25 [workflow-stale]: https://github.com/conda/conda-package-streaming/blob/main/.github/workflows/stale.yml
26 [labels-local]: https://github.com/conda/conda-package-streaming/blob/main/.github/labels.yml
27 [labels-page]: https://github.com/conda/conda-package-streaming/labels
28
29 This document seeks to outline how we as a community use GitHub Issues to track bugs and feature requests while still catering to development practices & project management (_e.g._, release cycles, feature planning, priority sorting, etc.).
30
31 <!-- only include high-level topics or particularly noteworthy sections here -->
32 **Topics:**
33
34 - [What is "Issue Sorting"?](#what-is-issue-sorting)
35 - [Labeling](#labeling)
36 - [Types of Issues](#types-of-issues)
37 - [Standard Issue](#standard-issue)
38 - [Epics](#epics)
39 - [Spikes](#spikes)
40 - [Working on Issues](#working-on-issues)
41 - [Development Processes](#development-processes)
42 - [Code Review and Merging](#code-review-and-merging)
43
44 > [!NOTE]
45 > This document is written in the style of an FAQ. For easier navigation, use [GitHub's table of contents feature][docs-toc].
46
47 ## What is "Issue Sorting"?
48
49 > [!NOTE]
50 > "Issue sorting" is similar to that of "triaging", but we've chosen to use different terminology because "triaging" is a word related to very weighty topics (_e.g._, injuries and war) and we would like to be sensitive to those connotations. Additionally, we are taking a more "fuzzy" approach to sorting (_e.g._, severities may not be assigned, etc.).
51
52 "Issue Sorting" refers to the process of assessing the priority of incoming issues. Below is a high-level diagram of the flow of issues:
53
54 ```mermaid
55 flowchart LR
56 subgraph flow_sorting [Issue Sorting in Issue Tracker]
57 state_sorting{{Maintainer sorting}}
58 end
59
60 subgraph flow_roadmap [Roadmap Board]
61 board_refinement{{Refinement}}
62 board_backlog{{Backlog}}
63
64 board_refinement-->board_backlog
65 board_backlog-- reprioritize -->board_backlog
66 board_progress{{Current Sprint - In Progress}}
67 end
68
69 state_new(New Issues)
70 state_closed(Closed)
71
72 state_new-->state_sorting
73 state_sorting-- accepted for work -->board_refinement
74 state_sorting-- duplicate, off-topic, support resolved -->state_closed
75 board_backlog-- pending work -->board_progress
76 board_refinement-- not actionable -->state_closed
77 board_backlog-- resolved, irrelevant -->state_closed
78 board_progress-- resolved -->state_closed
79 ```
80
81 ### Why sort issues?
82
83 At the most basic "bird's eye view" level, sorted issues will fall into the category of four main priority levels:
84
85 - Do now
86 - Do sometime
87 - Provide user support
88 - Never do (_i.e._, close)
89
90 At its core, sorting enables new issues to be placed into these four categories, which helps to ensure that they will be processed at a velocity similar to or exceeding the rate at which new issues are coming in. One of the benefits of actively sorting issues is to avoid engineer burnout and to make necessary work sustainable; this is done by eliminating a never-ending backlog that has not been reviewed by any maintainers.
91
92 There will always be broad-scope design and architecture implementations that the maintainers will be interested in pursuing; by actively organizing issues, they will be able to more easily track and tackle both specific and big-picture goals.
93
94 ### Who does the sorting?
95
96 Core maintainers help with sorting issues, making decisions regarding closing issues and setting feature work priorities, among other sorting-related tasks.
97
98 ### How does issue sorting and board intake work?
99
100 New issues that are opened in any of the repositories in the [conda GitHub organization][conda-org] are reviewed in the repository issue tracker first. During sorting in the issue tracker, issues are reviewed for the following outcomes:
101
102 - Mitigation via short-term workarounds and fixes
103 - Redirection to the correct project
104 - Determining if support can be provided for errors and questions
105 - Closing out of any duplicate/off-topic issues
106
107 The core maintainers are not seeking to _resolve_ issues that arise. Instead, the goal is to understand the issue and to determine whether it is legitimate, and then to collect as much relevant information as possible so that the maintainers can make an informed decision about the appropriate resolution schedule.
108
109 Issues can remain in this investigatory phase (_e.g._, querying the user for more details, asking the user to attempt other workarounds, other debugging efforts, etc.) and are likely to remain in this state the longest, but should still be progressing over the course of 1-2 weeks.
110
111 Items are added to the [Refinement tab of the Roadmap Board][project-refinement] once sorting has concluded and the core maintainer has enough information to make a decision about the appropriate resolution schedule for the issue. Newly opened pull requests are automatically added to the [Review board][project-review] by [`.github/workflows/project.yml`][workflow-project].
112
113 Issues that are not accepted for planned work are closed instead (_e.g._ duplicates, redirects, user errors, resolved support questions, etc.).
114
115 ### Where do work issues go after being sorted?
116
117 Once issues are accepted for work, they are added to the ["Refinement" tab of the Roadmap Board][project-refinement]. After refinement and prioritization, issues move to ["Backlog"][project-backlog] and then to ["Current Sprint"][project-current-sprint] when actively being worked. Issues are closed once the work is complete.
118
119 ### What is the purpose of having a "Backlog"?
120
121 Issues are "backlogged" when they have been accepted and refined but are not yet planned into the current sprint.
122
123 ### What automation procedures are currently in place?
124
125 Global automation procedures synced out from the [`conda/infrastructure`][infrastructure] repo include:
126
127 - [Marking/Closing stale issues and pull requests][workflow-stale]:
128 - https://github.com/conda/conda-package-streaming/labels/type%3A%3Asupport issues are labeled as stale after 21 days of inactivity and are closed after 7 more days of inactivity (that is, closed after 30 inactive days total)
129 - non https://github.com/conda/conda-package-streaming/labels/type%3A%3Asupport issues are labeled as stale after 365 days of inactivity and are closed after 30 more days of inactivity (that is, closed after an approximate total of 1 year and 1 month of inactivity)
130 - all pull requests are labeled as stale after 365 days of inactivity and are closed after 30 more days of inactivity (that is, closed after an approximate total of 1 year and 1 month of inactivity)
131 - [Locking of closed issues and pull requests with no further activity][workflow-lock] after 365 days
132 - [Adding new pull requests to the Review board][workflow-project]
133 - [Indicating an issue is ready for a maintainer's attention][workflow-issues] by toggling https://github.com/conda/conda-package-streaming/labels/pending%3A%3Afeedback with https://github.com/conda/conda-package-streaming/labels/pending%3A%3Asupport after a contributor leaves a comment
134 - [Verifying that contributors have signed the CLA][workflow-cla] before allowing pull requests to be merged; if the contributor hasn't signed the CLA previously, merging is blocked until a manual review can be done
135 - [Syncing out templates, labels, workflows, and documentation][workflow-sync] from [`conda/infrastructure`][infrastructure] to the other repositories
136
137 ### Are there any templates to use as responses for commonly-seen issues?
138
139 Some of the same types of issues appear regularly (_e.g._, issues that are duplicates of others, issues that should be filed in the Anaconda issue tracker, errors that are due to a user's specific setup/environment, etc.).
140
141 Below are some boilerplate responses for the most commonly-seen issues to be sorted:
142
143 <details>
144 <summary><b>Duplicate Issue</b></summary>
145
146 <!-- this is a code block, any links need to be embedded -->
147 <pre>
148
149 This is a duplicate of <b>[link to primary issue]</b>; please feel free to continue the discussion there.
150 </pre>
151
152 <!-- nested admonitions do not render -->
153 <!-- see https://github.com/orgs/community/discussions/16925#discussioncomment-9542248 -->
154 > **Warning**
155 > Apply the https://github.com/conda/conda-package-streaming/labels/duplicate label to the issue being closed and https://github.com/conda/conda-package-streaming/labels/duplicate%3A%3Aprimary to the original issue.
156
157 </details>
158
159 <details>
160 <summary><b>Anaconda Products</b></summary>
161
162 <!-- this is a code block, any links need to be embedded -->
163 <pre>
164 Thank you for filing this issue! Unfortunately, this is off-topic for this repo because it is related to an Anaconda product.
165 If you are encountering issues with Anaconda products or services, you have several options for receiving community
166 support:
167
168 - [Anaconda community forums](https://community.anaconda.cloud)
169 - [Anaconda issue tracker on GitHub](https://github.com/ContinuumIO/anaconda-issues/issues)
170 </pre>
171
172 <!-- nested admonitions do not render -->
173 <!-- see https://github.com/orgs/community/discussions/16925#discussioncomment-9542248 -->
174 > **Warning**
175 > Apply the https://github.com/conda/conda-package-streaming/labels/off-topic label to these issues before closing them out.
176
177 </details>
178
179 <details>
180 <summary><b>General Off Topic</b></summary>
181
182 <pre>
183 Unfortunately, this issue is outside the scope of support we offer via GitHub or is not directly related to this project.
184 Community support can be found elsewhere, though, and we encourage you to explore the following options:
185
186 - [Conda discourse forum](https://conda.discourse.group/)
187 - [Community chat channels](https://conda.org/community#chat)
188 - [Stack Overflow posts tagged "conda"](https://stackoverflow.com/questions/tagged/conda)
189 </pre>
190
191 <!-- nested admonitions do not render -->
192 <!-- see https://github.com/orgs/community/discussions/16925#discussioncomment-9542248 -->
193 > **Warning**
194 > Apply the https://github.com/conda/conda-package-streaming/labels/off-topic label to these issues before closing them out.
195
196 </details>
197
198 In order to not have to manually type or copy/paste the above repeatedly, note that it's possible to add text for the most commonly-used responses via [GitHub's "Add Saved Reply" option][docs-saved-reply].
199
200 ## Labeling
201
202 This section covers the labels and conventions used during issue sorting.
203
204 ### How does labeling work?
205
206 Labeling is a very important means for core maintainers to keep track of the current state of an issue with regards to the asynchronous nature of communicating with users. Utilizing the proper labels helps to identify the severity of the issue as well as to quickly understand the current state of a discussion.
207
208 Each label has an associated description that clarifies how the label should be used. Hover on the label to see its description. Label colors are used to distinguish labels by category.
209
210 Generally speaking, labels with the same category are considered mutually exclusive, but in some cases labels sharing the same category can occur concurrently, as they indicate qualifiers as opposed to types. For example, we may have the following types, https://github.com/conda/conda-package-streaming/labels/type%3A%3Abug, https://github.com/conda/conda-package-streaming/labels/type%3A%3Afeature, and https://github.com/conda/conda-package-streaming/labels/type%3A%3Adocumentation, where for any one issue there would be _at most_ **one** of these to be defined (_i.e._ an issue should not be a bug _and_ a feature request at the same time). Alternatively, with issues involving specific operating systems (_i.e._, https://github.com/conda/conda-package-streaming/labels/os%3A%3Alinux, https://github.com/conda/conda-package-streaming/labels/os%3A%3Amacos, and https://github.com/conda/conda-package-streaming/labels/os%3A%3Awindows), an issue could be labeled with one or more, depending on the system(s) the issue occurs on.
211
212 Please note that there are also automation policies in place that are affected by labeling. For example, if an issue is labeled as https://github.com/conda/conda-package-streaming/labels/type%3A%3Asupport, that issue will be marked https://github.com/conda/conda-package-streaming/labels/stale after 21 days of inactivity and auto-closed after seven more days without activity (30 inactive days total), which is earlier than issues without this label. See [What automation procedures are currently in place?](#what-automation-procedures-are-currently-in-place) for more details.
213
214 ### What labels are required for each issue?
215
216 At minimum, both `type` and `source` labels should be specified on each issue before adding it to the "Refinement" tab of the Roadmap Board. All issues that are bugs should also be tagged with a `severity` label.
217
218 The `type` labels are exclusive of each other: each sorted issue should have exactly one `type` label. These labels give high-level information on the issue's classification (_e.g._, bug, feature, tech debt, etc.)
219
220 The `source` labels are exclusive of each other: each sorted issue should have exactly one `source` label. These labels give information on the sub-group to which the issue's author belongs (_e.g._, a partner, a frequent contributor, the wider community, etc.). Through these labels, maintainers gain insight into how well we're meeting the needs of various groups.
221
222 The `severity` labels are exclusive of each other and, while required for the https://github.com/conda/conda-package-streaming/labels/type%3A%3Abug label, they can also be applied to other types to indicate demand or need. These labels help us to prioritize our work. Severity is not the only factor for work prioritization, but it is an important consideration.
223
224 Please review the descriptions of the `type`, `source`, and `severity` labels on the [labels page][labels-page] prior to use.
225
226 ### How are new labels defined?
227
228 Labels are defined using a scoped syntax with an optional high-level category (_e.g._, `source`, `tag`, `type`, etc.) and a specific topic, much like the following:
229
230 - `[topic]`
231 - `[category::topic]`
232 - `[category::topic-phrase]`
233
234 This syntax helps with issue sorting enforcement, as it helps to ensure that sorted issues are, at minimum, categorized by type and source.
235
236 There are a number of labels that have been defined for the different repositories. In order to create a streamlined sorting process, label terminologies are standardized using similar (if not the same) labels.
237
238 ### How are new labels added?
239
240 New **global** labels (_i.e._, labels that apply equally to all repositories within the conda GitHub organization) are added to [`conda/infrastructure`][infrastructure]'s [`.github/global.yml` file][labels-global]; new **local** labels (_i.e._, labels specific to particular repositories) are added to each repository's [`.github/labels.yml` file][labels-local]. All new labels should follow the labeling syntax described in ["How are new labels defined?"](#how-are-new-labels-defined). Global labels are combined with any local labels and these aggregated labels are used by the [`.github/workflows/labels.yml` workflow][workflow-labels] to synchronize the labels available for the repository.
241
242 ## Types of Issues
243
244 ### Standard Issue
245
246 Standard issues represent typical bug reports, feature requests, or other work items that have a clear definition and expected outcome.
247
248 ### Epics
249
250 Epics are large work items that can be broken down into smaller, more manageable issues. They typically represent major features or significant changes that span multiple iterations or releases. Relate the smaller issues to the epic using the sub-issues feature in GitHub.
251
252 ### Spikes
253
254 #### What is a spike?
255
256 "Spike" is a term that is borrowed from extreme programming and agile development. They are used when the **outcome of an issue is unknown or even optional**. For example, when first coming across a problem that has not been solved before, a project may choose to either research the problem or create a prototype in order to better understand it.
257
258 Additionally, spikes represent work that **may or may not actually be completed or implemented**. An example of this are prototypes created to explore possible solutions. Not all prototypes are implemented and the purpose of creating a prototype is often to explore the problem space more. For research-oriented tasks, the end result of this research may be that a feature request simply is not viable at the moment and would result in putting a stop to that work.
259
260 Finally, spikes are usually **timeboxed**. However, given the open source/volunteer nature of our contributions, we do not enforce this for our contributors. When a timebox is set, this means that we are limiting how long we want someone to work on said spike. We do this to prevent contributors from falling into a rabbit hole they may never return from. Instead, we set a time limit to perform work on the spike and then have the assignee report back. If the tasks defined in the spike have not yet been completed, a decision is made on whether it makes sense to perform further work on the spike.
261
262 #### When do I create a spike?
263
264 A spike should be created when we do not have enough information to move forward with solving a problem. That simply means that, whenever we are dealing with unknowns or processes the project team has never encountered before, it may be useful for us to create a spike.
265
266 In day-to-day work, this kind of situation may appear when new bug reports or feature requests come in that deal with problems or technologies that the project team is unfamiliar with. All issues that the project team has sufficient knowledge of should instead proceed as regular issues.
267
268 #### When do I not create a spike?
269
270 Below are some common scenarios where creating a spike is not appropriate:
271
272 - Writing a technical specification for a feature we know how to implement
273 - Design work that would go into drafting how an API is going to look and function
274 - Any work that must be completed or is not optional
275
276 ## Working on Issues
277
278 ### How do I assign myself to an issue I am actively reviewing?
279
280 If you do **not** have permissions, please indicate that you are working on an issue by leaving a comment. Someone who has permissions will assign you to the issue. If two weeks have passed without a pull request or an additional comment requesting information, you may be removed from the issue and the issue reassigned.
281
282 If you are assigned to an issue but will not be able to continue work on it, please comment to indicate that you will no longer be working on it and press `unassign me` next to your username in the `Assignees` section of the issue page (top right).
283
284 If you **do** have permissions, please assign yourself to the issue by pressing `assign myself` under the `Assignees` section of the issue page (top right).
285
286 ## Development Processes
287
288 The following are practices the conda organization encourages for feature
289 development. While we recommend projects under the conda organization adopt
290 these practices, they are not strictly required.
291
292 ### How should we approach feature development?
293
294 For new features, first open an issue if one doesn’t exist. Once the feature request
295 has been accepted (indicated by the issue's status transitioning from "Sorting" to
296 "Refinement"), create a specification to gather early feedback. This can include
297 mockups, API/command references, a written plan in the issue, and sample CLI
298 arguments (without functionality).
299
300 ### What is our change process?
301
302 For larger features, break down the work into smaller, manageable issues
303 that are added to the backlog. As long as a feature remains on the roadmap
304 or backlog, do not create long-lived feature branches that span multiple
305 pull requests. Instead, you should integrate small slices of an overall
306 feature directly into the main branch to avoid complex integration challenges.
307
308 ### Should we make unrelated changes at the same time?
309
310 When making changes, try to follow the Campsite Rule to leave things better
311 than when you found them. You should enhance the code you encounter, even if
312 primary goal is unrelated. This could involve refactoring small sections,
313 improving readability, or fixing minor bugs.
314
315 ## Code Review and Merging
316
317 ### What are the review requirements?
318
319 #### Standard Review
320
321 Most code changes require one reviewer from someone on the maintainer team for
322 the repository. Instead of waiting for someone on the team to review it,
323 directly requesting a review from the person you previously identified to work
324 with is preferred to optimize teamwork. If you paired with them during
325 development, continuous review counts as this requirement.
326
327 #### Second Review
328
329 Required only when the code author or the first reviewer feels like it is
330 necessary to get another set of eyes on a proposed change. In this case, they
331 add someone specific through GitHub's Request Review feature with a comment on
332 what they want the person to look for.
333
334 ### What are the code review best practices?
335
336 If you are conducting a review, adhere to these best practices:
337
338 - Provide comprehensive feedback in the first review to minimize review rounds
339 - Reserve Request Changes for blocking issues (bugs or other major problems) —
340 Select Comment for suggestions and improvements
341 - Follow-up reviews should focus on whether requested changes resolve original
342 comments
343 - Code should be production-ready and maintainable when merged, but doesn't
344 need to be perfect
345 - If providing feedback outside the core review focus (nitpicks, tips,
346 suggestions), clearly mark these as non-blocking comments that don't need to
347 be addressed before merging.
348
349 ### How do we merge code?
350
351 If you are the approving reviewer (typically the first reviewer, or the second
352 reviewer when needed) and you have completed your review and approved the
353 changes, you should merge the code immediately to maintain development
354 velocity.
355
356 Normally, we use squash and merge to keep a clean git history. If you are
357 merging a pull request, help ensure that the pull request title is updated.