From 238cc061022d330a3bc0945ad230717ee6b3be2f Mon Sep 17 00:00:00 2001 From: Zain Rizvi Date: Fri, 21 Oct 2022 10:40:21 -0500 Subject: [PATCH] Formatting --- PyTorch-AutoLabel-Bot.md | 32 +++++++++++++++++--------------- 1 file changed, 17 insertions(+), 15 deletions(-) diff --git a/PyTorch-AutoLabel-Bot.md b/PyTorch-AutoLabel-Bot.md index f4a1a3b..ecb5fc3 100644 --- a/PyTorch-AutoLabel-Bot.md +++ b/PyTorch-AutoLabel-Bot.md @@ -4,6 +4,22 @@ PyTorch maintainers use GitHub labeling for several organizational purposes, such as triaging issues to the right module owners, assigning priority to certain tasks, and categorizing pull requests (PRs). Labeling has much potential! Thus, this is a technical guide for how it works and how you can join in and improve our labeling. +## Why categorize (for release notes)? And how does it work? +**Why categorize?** The purpose of categorizing is so that during the release notes process, commits/PRs are routed to the right module owner whose job is to clean up the commit message and include additional information regarding bc-breaking changes or deprecations. + +**When and how?** Categorizing a PR to the right module should happen before it is landed and can be done by adding a single `release notes: ` label. Labels corresponding to the modules are prefixed with `release notes:`. To find a full list of all the labels see: https://github.com/pytorch/pytorch/labels?q=release+notes%3A. +- Optionally add a single `topic: blah` to make the module owners lives easier later. +- For PRs that are not user facing and are not intended to be a part of the release notes, the `topic: not user facing` should be added. In that case, the `release notes: ` label is not required. + +If you are unsure of which label should be added, please ask your PR reviewer for help. One can also search existing PRs for examples: https://github.com/pytorch/pytorch/pulls?q=is%3Apr+is%3Aopen+label%3A%22release+notes%3A+nn%22 + +**Maintainers: Automate the categorization** +If a regex against the file path can identify the module your PR affects, you can automate the labeling process by [adding an entry in this list](https://github.com/pytorch/test-infra/blob/9c1616a9664ba4c1a9ccdf953db37257fa266022/torchci/lib/bot/autoLabelBot.ts#L12-L106) + +The current heuristics we use are mainly defined in the [`getReleaseNotesCategoryAndTopic`](https://github.com/pytorch/test-infra/blob/main/torchci/lib/bot/autoLabelBot.ts#L130) function. You can always help extend our heuristics by making conditions more specific, extending our bot to categorize more by looking at existing labels/title patterns/features of the pull request. + +Please file an issue and tag @soulitzer/@ZainRizvi if you find that your PRs are being mislabeled + ## How it works Our autolabel bot hinges on Probot webhooks. You can read all about [Probot in the GitHub docs](https://probot.github.io/docs/), but the docs contain more details than you need to know for developing on the autolabel bot and could confuse you. It suffices to know that Probot allows you to plug into [GitHub webhooks](https://docs.github.com/en/developers/webhooks-and-events/webhooks/about-webhooks), where webhooks notify you of GitHub-related events such as "a PR has been pushed!" or "a label has been added to an issue!" or "someone edited a PR title!". @@ -22,20 +38,6 @@ yarn test test/autoLabelBot.test.ts When your change is ready, open up a pull request to [our test-infra repo](https://github.com/pytorch/test-infra) and tag @pytorch/pytorch-dev-infra for a review. -### Why categorize (for release notes)? And how does it work? -**Why categorize?** The purpose of categorizing is so that during the release notes process, commits/PRs are routed to the right module owner whose job is to clean up the commit message and include additional information regarding bc-breaking changes or deprecations. - -**When and how?** Categorizing a PR to the right module should happen before it is landed and can be done by adding a single `release notes: ` label. Labels corresponding to the modules are prefixed with `release notes:`. To find a full list of all the labels see: https://github.com/pytorch/pytorch/labels?q=release+notes%3A. -- Optionally add a single `topic: blah` to make the module owners lives easier later. -- For PRs that are not user facing and are not intended to be a part of the release notes, the `topic: not user facing` should be added. In that case, the `release notes: ` label is not required. - -If you are unsure of which label should be added, please ask your PR reviewer for help. One can also search existing PRs for examples: https://github.com/pytorch/pytorch/pulls?q=is%3Apr+is%3Aopen+label%3A%22release+notes%3A+nn%22 - -**Maintainers: Automate the categorization** -If a regex against the file path can identify the module your PR affects, you can automate the labeling process by [adding an entry in this list](https://github.com/pytorch/test-infra/blob/9c1616a9664ba4c1a9ccdf953db37257fa266022/torchci/lib/bot/autoLabelBot.ts#L12-L106) - -The current heuristics we use are mainly defined in the [`getReleaseNotesCategoryAndTopic`](https://github.com/pytorch/test-infra/blob/main/torchci/lib/bot/autoLabelBot.ts#L130) function. You can always help extend our heuristics by making conditions more specific, extending our bot to categorize more by looking at existing labels/title patterns/features of the pull request. - -Please file an issue and tag @soulitzer/@janeyx99 if you find that your PRs are being mislabeled +