Browse Source

fix(ui): Add module to issue owners examples (#35536)

Taylan Gocmen 2 years ago
parent
commit
7feb09edd7

+ 3 - 1
static/app/views/settings/project/projectOwnership/editRulesModal.tsx

@@ -27,7 +27,9 @@ class EditOwnershipRulesModal extends Component<Props, State> {
         <Block>
           {t('Examples')}
           <CodeBlock>
-            path:src/example/pipeline/* person@sentry.io #infrastructure
+            path:src/example/pipeline/* person@sentry.io #infra
+            {'\n'}
+            module:com.module.name.example #sdks
             {'\n'}
             url:http://example.com/settings/* #product
             {'\n'}

+ 1 - 0
static/app/views/settings/project/projectOwnership/index.tsx

@@ -74,6 +74,7 @@ class ProjectOwnership extends AsyncView<Props, State> {
   getPlaceholder() {
     return `#example usage
 path:src/example/pipeline/* person@sentry.io #infra
+module:com.module.name.example #sdks
 url:http://example.com/settings/* #product
 tags.sku_class:enterprise #enterprise`;
   }

+ 1 - 0
static/app/views/settings/project/projectOwnership/ownerInput.tsx

@@ -171,6 +171,7 @@ class OwnerInput extends Component<Props, State> {
             placeholder={
               '#example usage\n' +
               'path:src/example/pipeline/* person@sentry.io #infra\n' +
+              'module:com.module.name.example #sdks\n' +
               'url:http://example.com/settings/* #product\n' +
               'tags.sku_class:enterprise #enterprise'
             }

+ 3 - 0
static/app/views/settings/project/projectOwnership/ruleBuilder.tsx

@@ -28,6 +28,8 @@ function getMatchPlaceholder(type: string): string {
   switch (type) {
     case 'path':
       return 'src/example/*';
+    case 'module':
+      return 'com.module.name.example';
     case 'url':
       return 'https://example.com/settings/*';
     case 'tag':
@@ -151,6 +153,7 @@ class RuleBuilder extends Component<Props, State> {
             onChange={this.handleTypeChange}
             options={[
               {value: 'path', label: t('Path')},
+              {value: 'module', label: t('Module')},
               {value: 'tag', label: t('Tag')},
               {value: 'url', label: t('URL')},
             ]}