Compare commits

...
Author SHA1 Message Date
Saoud Rizwan 9b91b5e604 Discuss project bugs 2025-10-29 15:37:37 -07:00
5 changed files with 33 additions and 19 deletions
+3
View File
@@ -0,0 +1,3 @@
#!/bin/sh
command -v git-lfs >/dev/null 2>&1 || { printf >&2 "\n%s\n\n" "This repository is configured for Git LFS but 'git-lfs' was not found on your path. If you no longer wish to use Git LFS, remove this hook by deleting the 'post-checkout' file in the hooks directory (set by 'core.hookspath'; usually '.git/hooks')."; exit 2; }
git lfs post-checkout "$@"
+3
View File
@@ -0,0 +1,3 @@
#!/bin/sh
command -v git-lfs >/dev/null 2>&1 || { printf >&2 "\n%s\n\n" "This repository is configured for Git LFS but 'git-lfs' was not found on your path. If you no longer wish to use Git LFS, remove this hook by deleting the 'post-commit' file in the hooks directory (set by 'core.hookspath'; usually '.git/hooks')."; exit 2; }
git lfs post-commit "$@"
+3
View File
@@ -0,0 +1,3 @@
#!/bin/sh
command -v git-lfs >/dev/null 2>&1 || { printf >&2 "\n%s\n\n" "This repository is configured for Git LFS but 'git-lfs' was not found on your path. If you no longer wish to use Git LFS, remove this hook by deleting the 'post-merge' file in the hooks directory (set by 'core.hookspath'; usually '.git/hooks')."; exit 2; }
git lfs post-merge "$@"
+3
View File
@@ -0,0 +1,3 @@
#!/bin/sh
command -v git-lfs >/dev/null 2>&1 || { printf >&2 "\n%s\n\n" "This repository is configured for Git LFS but 'git-lfs' was not found on your path. If you no longer wish to use Git LFS, remove this hook by deleting the 'pre-push' file in the hooks directory (set by 'core.hookspath'; usually '.git/hooks')."; exit 2; }
git lfs pre-push "$@"
+21 -19
View File
@@ -75,29 +75,31 @@ export function useAutoApproveActions() {
return
}
const newActions = {
...autoApprovalSettings.actions,
[actionId]: value,
const newActions = {
...autoApprovalSettings.actions,
[actionId]: value,
}
if (value === false && subActionId) {
// Only set subActionId if it's a valid key of actions (not "enableNotifications", "enableAll", or "enableAutoApprove")
if (subActionId in newActions) {
newActions[subActionId as keyof AutoApprovalSettings["actions"]] = false
}
}
if (value === false && subActionId) {
// @ts-expect-error: TODO: See how we can fix this
newActions[subActionId] = false
}
if (value === true && action.parentActionId) {
newActions[action.parentActionId as keyof AutoApprovalSettings["actions"]] = true
}
if (value === true && action.parentActionId) {
newActions[action.parentActionId as keyof AutoApprovalSettings["actions"]] = true
}
// Check if this will result in any enabled actions
const willHaveEnabledActions = Object.values(newActions).some(Boolean)
// Check if this will result in any enabled actions
const willHaveEnabledActions = Object.values(newActions).some(Boolean)
await updateAutoApproveSettings({
...autoApprovalSettings,
version: (autoApprovalSettings.version ?? 1) + 1,
actions: newActions,
enabled: willHaveEnabledActions,
})
await updateAutoApproveSettings({
...autoApprovalSettings,
version: (autoApprovalSettings.version ?? 1) + 1,
actions: newActions,
enabled: willHaveEnabledActions,
})
},
[autoApprovalSettings],
)