fix: [code-1046]: fix inverted target patterns and text (#752)
This commit is contained in:
parent
49ca8a8bc3
commit
cd2447a82c
|
@ -65,7 +65,6 @@ const BranchProtectionForm = (props: {
|
|||
const { showError, showSuccess } = useToaster()
|
||||
const { editMode = false, repoMetadata, ruleUid, refetchRules } = props
|
||||
const { getString } = useStrings()
|
||||
|
||||
const { data: rule } = useGet<OpenapiRule>({
|
||||
path: `/api/v1/repos/${repoMetadata?.path}/+/rules/${ruleId}`,
|
||||
lazy: !repoMetadata && !ruleId
|
||||
|
@ -212,8 +211,8 @@ const BranchProtectionForm = (props: {
|
|||
state: formData.enable === true ? 'active' : 'disabled',
|
||||
pattern: {
|
||||
default: formData.targetDefault,
|
||||
exclude: includeArray,
|
||||
include: excludeArray
|
||||
exclude: excludeArray,
|
||||
include: includeArray
|
||||
},
|
||||
definition: {
|
||||
bypass: {
|
||||
|
|
|
@ -36,7 +36,7 @@ const BranchProtectionHeader = ({
|
|||
<Layout.Horizontal spacing="medium">
|
||||
<Button
|
||||
variation={ButtonVariation.PRIMARY}
|
||||
text={getString('branchProtection.newBranchProtectionRule')}
|
||||
text={getString('branchProtection.newRule')}
|
||||
icon={CodeIcon.Add}
|
||||
onClick={() =>
|
||||
history.push(
|
||||
|
|
|
@ -326,7 +326,7 @@ const BranchProtectionListing = (props: { activeTab: string }) => {
|
|||
)
|
||||
}
|
||||
id="protectionApplied"
|
||||
summary={`${nonEmptyRules.length} Protections applied`}
|
||||
summary={`${nonEmptyRules.length} Rules applied`}
|
||||
/>
|
||||
</Accordion>
|
||||
</Container>
|
||||
|
@ -388,7 +388,7 @@ const BranchProtectionListing = (props: { activeTab: string }) => {
|
|||
showWhen={() => rules?.length === 0}
|
||||
forSearch={!!searchTerm}
|
||||
message={getString('branchProtection.ruleEmpty')}
|
||||
buttonText={getString('branchProtection.newBranchProtectionRule')}
|
||||
buttonText={getString('branchProtection.newRule')}
|
||||
onButtonClick={() => {
|
||||
history.push(
|
||||
routes.toCODESettings({
|
||||
|
|
|
@ -70,7 +70,7 @@ export interface StringsMap {
|
|||
'branchProtection.minNumber': string
|
||||
'branchProtection.minNumberPlaceholder': string
|
||||
'branchProtection.namePlaceholder': string
|
||||
'branchProtection.newBranchProtectionRule': string
|
||||
'branchProtection.newRule': string
|
||||
'branchProtection.protectionSelectAll': string
|
||||
'branchProtection.reqCommentResolutionText': string
|
||||
'branchProtection.reqCommentResolutionTitle': string
|
||||
|
|
|
@ -851,16 +851,16 @@ Enable: Enable
|
|||
branchProtection:
|
||||
namePlaceholder: Enter the rule name here
|
||||
descPlaceholder: Enter the description here
|
||||
title: Protection Rules
|
||||
edit: Edit Branch Protection
|
||||
create: Create Branch Protection
|
||||
title: Rules
|
||||
edit: Edit Rule
|
||||
create: Create Rule
|
||||
targetBranches: Target Patterns
|
||||
targetPlaceholder: Enter the target patterns
|
||||
defaultBranch: Default branch
|
||||
bypassList: Bypass List
|
||||
newBranchProtectionRule: New Branch Protection Rule
|
||||
newRule: New branch rule
|
||||
allRepoOwners: Allow users with edit permission on the repository to bypass
|
||||
protectionSelectAll: 'Protections: Select all that apply'
|
||||
protectionSelectAll: 'Rules: Select all that apply'
|
||||
requireMinReviewersTitle: Require a minimum number of reviewers
|
||||
requireMinReviewersContent: Require approval on pull requests from a minimum number of reviewers
|
||||
minNumber: Minimum number
|
||||
|
|
|
@ -206,7 +206,7 @@ export const rulesFormInitialPayload = {
|
|||
desc: '',
|
||||
enable: true,
|
||||
target: '',
|
||||
targetDefault: true,
|
||||
targetDefault: false,
|
||||
targetList: [] as string[][],
|
||||
allRepoOwners: false,
|
||||
bypassList: [] as string[],
|
||||
|
|
Loading…
Reference in New Issue