Skip to content

Commit 875ae49

Browse files
authored
improve enable suspect commits content (#5094)
* restructured page * restructured page * restructured enable suspect commits page * fixes to improve flow * fixing typo and clarifying language * wording fixes
1 parent 2421cdd commit 875ae49

File tree

4 files changed

+57
-56
lines changed

4 files changed

+57
-56
lines changed

src/docs/product/cli/releases.mdx

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,14 @@ Releases can also be auto created by different systems. For instance upon upload
3232

3333
## Finalizing Releases
3434

35-
By default a release is created “unreleased”. Finalizing a release means that we fill in a second timestamp on the release record, which is prioritized over `date_created` when sorting releases in the UI. This also affects what counts as "the next release" for resolving issues, what release is used as the base for associating commits if you use `--auto`, and creates an entry in the Activity stream.
35+
By default a release is created “unreleased”. Finalizing a release means that we populate a second timestamp on the release record, which is prioritized over `date_created` when sorting releases in [sentry.io](https://sentry.io). Release finalization (and the timestamp) also affects:
3636

37-
This can be changed by passing either `--finalize` to the `new` command which will immediately finalize the release or you can separately call `sentry-cli releases finalize VERSION` later on. The latter is useful if you are managing releases as part of a build process e.g.
37+
- What counts as "the next release" for resolving issues
38+
- What release is used as the base for associating commits if you use `--auto`
39+
40+
In addition, it creates an entry in the **Activity** stream.
41+
42+
You can change this by passing either `--finalize` to the `new` command, which will immediately finalize the release, or by separately calling `sentry-cli releases finalize VERSION` later on, which is useful if you are managing releases as part of a build process. For example:
3843

3944
```bash
4045
#!/bin/sh

src/docs/product/issues/states-triage/index.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ Triage typically involves one or more of the following actions.
3838

3939
### Resolve
4040

41-
Resolve an issue when it's fixed or you don't expect it to happen again. You can do this manually or by [including the issue ID in a commit](/product/integrations/source-code-mgmt/github/#resolve-via-commit-or-pull-request). In addition, you can resolve issues by setting the auto-resolve value.
41+
Resolve an issue when it's fixed or you don't expect it to happen again. You can do this manually or by [including the issue ID in a commit](/product/releases/suspect-commits/#resolve-issues-by-commit). In addition, you can resolve issues by setting the auto-resolve value.
4242

4343
The "Auto Resolve" feature allows you to specify an interval after the last occurrence of an issue when it should be automatically resolved. To check if this has been defined for a project, go to **[Project] > Settings > General Settings** and check the "Event Settings" section.
4444

src/docs/product/releases/setup/manual-setup-releases.mdx

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,13 @@ If you don’t want [install a repository integration](/product/releases/setup/r
88

99
## Using the CLI
1010

11+
In this CLI example:
12+
13+
- Environment variables configure the CLI (see [Working with Projects](/product/cli/configuration/#sentry-cli-working-with-projects) for alternatives)
14+
- The `propose-version` sub-command determines a release ID automatically
15+
- A release tagged `VERSION` is created for the organization `my-org` for projects (`project1` and `project2`)
16+
- The `--auto` flag determines the repository name automatically, and associates commits between the previous release’s commit and the current head commit with the release.
17+
1118
```bash
1219
# Assumes you're in a git repository
1320
export SENTRY_AUTH_TOKEN=...

src/docs/product/releases/suspect-commits/index.mdx

Lines changed: 42 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,59 @@
11
---
2-
title: Enable Suspect Commits
2+
title: Suspect Commits
33
sidebar_order: 2
4-
description: "Learn how to associate commits to a release to track suspect commits."
4+
description: "Learn how associating commits to a release allows you to track suspect commits."
55
---
66

7-
In your release process, add a step to create a release in Sentry and associate it with commits from your linked repository. We recommend using Sentry’s [Command Line Interface](/product/cli/releases/) or [our API](/product/releases/setup/manual-setup-releases/#using-the-api) to add this step in your release process, especially if you're using [Release Automation](/product/releases/setup/release-automation/).
7+
In your release process, you can add a step to create a release in Sentry and associate it with commits from your linked repository. When you've done this, you'll be able to see suspect commits and suggested assignees in issues, as well as resolve issues by commit, as described below.
88

9-
After this, we can tie together the commits in the release, including:
9+
10+
If you're using one of our [release automation](/product/releases/setup/release-automation/) options or our [manual setup](/product/releases/setup/manual-setup-releases/) instructions, suspect commits should already be enabled. However, we've included directions for enabling suspect commits using the [Sentry CLI](#using-the-cli) and [our API](#using-the-api) at the end of this page, just in case you need them.
11+
12+
## Suspect Commits & Suggested Assignees
13+
14+
When you've enabled suspect commits, we can tie together the commits in the release, including:
1015

1116
- Files touched by those commits
1217
- Files observed in the stack trace
1318
- Authors of those files
1419
- The issue number in a commit message
1520

21+
Suspect commits and suggested assignees will then display on the **Issue Details** page in [sentry.io](https://sentry.io):
22+
23+
![The suspect commits and suggested assignees for an issue](suspect-commits-highlighted.png)
24+
25+
## Resolve Issues by Commit
26+
27+
Additionally, when you've enabled suspect commits, you'll be able to resolve issues by including the issue ID in your commit message. You can find the issue ID at the top of the **Issue Details** page, next to the assignee dropdown.
28+
29+
A commit message might look like this, for example:
30+
31+
```bash
32+
Prevent empty queries on users
33+
34+
Fixes SENTRY-317
35+
```
36+
37+
When Sentry sees this commit, we’ll reference the commit in the issue, and when you create a release in Sentry, we’ll mark the issue as resolved in that release.
38+
39+
<Note>
40+
41+
If you’re using GitHub, you may have a privacy setting enabled that prevents Sentry from identifying the user’s actual email address. To use the suggested owners feature, uncheck “Keep my email address private” in GitHub’s [account settings](https://github.com/settings/emails).
42+
43+
</Note>
44+
45+
## Enable Suspect Commits
46+
47+
We recommend using Sentry’s [Command Line Interface](/product/cli/releases/) or [our API](/product/releases/setup/manual-setup-releases/#using-the-api) to add this step in your release process, whether you're doing this manually or using release automation. If you're using one of our [release automation](/product/releases/setup/release-automation/) options or our [manual setup](/product/releases/setup/manual-setup-releases/) instructions, this step should already be included, but we've included the relevant code below just in case.
48+
1649
This process assumes:
1750

18-
- the SDK is [configured to provide a release identifier](/platform-redirect/?next=/configuration/releases/)
19-
- [Source maps](/platforms/javascript/sourcemaps/) have been uploaded
51+
- The SDK is [configured to provide a release identifier](/platform-redirect/?next=/configuration/releases/)
52+
- Source maps — or your platform-specific files for mapping transformed source code to the original source — have been uploaded (check out the docs for your [specific platform](/platforms/))
2053

21-
## Using the CLI
54+
### Using the CLI
2255

23-
In this CLI example:
24-
- Environment variables configure the CLI (see [Working with Projects](/product/cli/configuration/#sentry-cli-working-with-projects) for alternatives)
25-
- The `propose-version` sub-command determines a release ID automatically
26-
- A release tagged `VERSION` is created for the organization `my-org` for projects (`project1` and `project2`)
27-
- The `--auto` flag determines the repository name automatically, and associates commits between the previous release’s commit and the current head commit with the release.
56+
In this CLI example, the `--auto` flag determines the repository name automatically, and associates commits between the previous release’s commit and the current head commit with the release.
2857

2958
<Note>
3059

@@ -53,47 +82,7 @@ The following example associates commits (or refs) between `from` and `to` with
5382
sentry-cli releases set-commits --commit "[email protected]" $VERSION
5483
```
5584

56-
For more information, see our [CLI docs](/product/cli/releases/).
57-
58-
After this step, suspect commits and suggested assignees will display on the Issues page.
59-
60-
![](suspect-commits-highlighted.png)
61-
62-
Additionally, you will be able to resolve issues by including the issue ID in your commit message. You can find the issue ID at the top of the Issue Details page, next to the assignee dropdown. For example, a commit message might look like this:
63-
64-
```bash
65-
Prevent empty queries on users
66-
67-
Fixes SENTRY-317
68-
```
69-
70-
When Sentry sees this commit, we’ll reference the commit in the issue, and when you create a release in Sentry we’ll mark the issue as resolved in that release.
71-
72-
<Note>
73-
74-
If you’re using GitHub, you may have a privacy setting enabled that prevents Sentry from identifying the user’s actual email address. To use the suggested owners feature, uncheck “Keep my email address private” in GitHub’s [account settings](https://github.com/settings/emails).
75-
76-
</Note>
77-
78-
### Finalize the Release
79-
80-
By default, a release is created as “unreleased”. Finalizing a release means that we populate a second timestamp on the release record, which is prioritized over `date_created` when sorting releases in sentry.io. Release finalization (and the timestamp) also affects:
81-
- What counts as "the next release" for resolving issues
82-
- Which release is used as the base for associating commits if you use `--auto`
83-
- Creates an entry in the Activity stream
84-
85-
You can change this by passing either `--finalize` to the `new` command, which will immediately finalize the release, or by separately calling `sentry-cli releases finalize VERSION` later on, which is useful if you are managing releases as part of a build process.
86-
87-
You can also choose to finalize the release when you've made the release live (such as when you've deployed to your machines or enabled in the App store).
88-
89-
```bash
90-
#!/bin/sh
91-
sentry-cli releases new "$VERSION"
92-
# do your build steps here
93-
# once you are done, finalize
94-
sentry-cli releases finalize "$VERSION"
95-
```
96-
## Using the API
85+
### Using the API
9786

9887
<Note>
9988

0 commit comments

Comments
 (0)