Skip to content
This repository was archived by the owner on Jun 26, 2026. It is now read-only.

feat: add commit-msg hook and simplify session-commit#47

Closed
Cragsmann wants to merge 28 commits into
functions-dev:masterfrom
Cragsmann:SRVOCF-950--commit-msg-hook-and-slash-commands
Closed

feat: add commit-msg hook and simplify session-commit#47
Cragsmann wants to merge 28 commits into
functions-dev:masterfrom
Cragsmann:SRVOCF-950--commit-msg-hook-and-slash-commands

Conversation

@Cragsmann

Copy link
Copy Markdown
Collaborator

Summary

  • Add Husky pre-commit (lint) and commit-msg hooks
  • commit-msg hook validates: conventional commit type prefix, authorship trailer (Co-Authored-By or Signed-off-by), no em dashes
  • Merge, fixup, and squash commits are exempt
  • Simplify session-commit: remove progress log and blocker migration steps, add hook failure handling
  • Remove redundant commit-user command

Issue: SRVOCF-950

Test plan

  • Verify tandem commit (with Co-Authored-By) passes the hook
  • Verify autonomous commit (with Signed-off-by) passes the hook
  • Verify commit without authorship trailer is rejected
  • Verify commit without conventional type prefix is rejected
  • Verify commit with em dash is rejected
  • Verify merge commits bypass the hook
  • Run /session-commit and confirm it produces a valid commit

Cragsmann and others added 28 commits June 15, 2026 11:34
When fetchFileContent fails for a repo, return an error table
item instead of null. This surfaces the failure to the user
rather than silently hiding the repo from the list.

Co-Authored-By: Claude <noreply@anthropic.com>
The list page now shows failed repos as error items
instead of dropping them. Update the test to expect
both items in the table and verify the failed repo
appears by name.

Co-Authored-By: Claude <noreply@anthropic.com>
The upstream cluster CA feature added a new endpoint
that generateKubeconfig calls. Add the MSW handler
to FunctionCreatePage test so the create flow works.

Co-Authored-By: Claude <noreply@anthropic.com>
Replace '<UNKNOWN>' with empty strings so TextOrDash
renders em dashes automatically. Add console.error
for developer debugging. Remove the null filter since
the catch block always returns an item now.

Co-Authored-By: Claude <noreply@anthropic.com>
…ration

SRVOCF-846: Migrate remaining unit tests to MSW
Two tests referenced undefined mockUseSourceControl, causing CI
failure. Rewrote both to use the existing MSW helpers
(setupReposHandler, setupFuncYamlHandler) consistent with the
rest of the test file.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…t-page-crashes

SRVOCF-840: Fix list page error handling
Replace hardcoded Flex layout (fixed 16rem sidebar) with PatternFly
Sidebar/SidebarPanel/SidebarContent for a responsive 25% panel
width. Add a horizontal DescriptionList showing the repository link
and branch inside the sidebar panel, aligned with the file tree.

Add FileIcon, FolderIcon, and FolderOpenIcon to tree nodes so
directories and files are visually distinguishable.

Co-Authored-By: Claude <noreply@anthropic.com>
Without local checks, lint errors, type failures, and unformatted
Go code only surface in CI or code review. This adds a Husky
pre-commit hook that catches these before they leave the
developer's machine.

The hook runs three checks in sequence, failing fast on the first
error: eslint/stylelint via "yarn lint:fix", TypeScript type-check
via "tsc --noEmit", and Go vet/gofmt on the backend directory.

Also adds skipLibCheck to tsconfig.json to avoid type errors from
third-party declaration files during the new type-check step.

Co-Authored-By: Claude <noreply@anthropic.com>
The squashed commit referenced parseFuncYaml which does not exist
on this branch. Restore the correct parseNamespaceAndRuntime
import and call site.

Co-Authored-By: Claude <noreply@anthropic.com>
lint:fix modifies files on disk but the changes are not
automatically re-staged. The commit would contain the unfixed
version while the fix is left as an unstaged working tree change.

Plain lint fails fast and lets the developer fix and re-stage
intentionally.

Co-Authored-By: Claude <noreply@anthropic.com>
Add Husky pre-commit (lint) and commit-msg hooks. The commit-msg
hook validates conventional commit type prefix, authorship trailer
(Co-Authored-By or Signed-off-by), and rejects em dashes. Merge,
fixup, and squash commits are exempt.

Simplify session-commit: remove progress log and blocker migration
steps, add hook failure handling. Remove redundant commit-user
command.

Co-Authored-By: Claude <noreply@anthropic.com>
…layout-ux

SRVOCF-850: Editor page layout and UX improvements
Co-authored-by: David Simansky <dsimansk@redhat.com>
Without set -e, failures from yarn lint, yarn type-check, and
go vet were silently ignored. The hook would exit 0 and allow
the commit through. Also deduplicates the gofmt call and
switches shebang to bash for pipefail compatibility.

Co-Authored-By: Claude <noreply@anthropic.com>
…re-commit

SRVOCF-946: Add Husky pre-commit hook
@matejvasek

Copy link
Copy Markdown
Collaborator

Should not this be only in fork. IMO this repo should be archived we would develop only in our fork now.

@matejvasek matejvasek closed this Jun 25, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants