Skip to content

docs: update hooks.md event name list and count to include sessionEnd and userPromptSubmitted - #2549

Merged
WilliamBerryiii merged 3 commits into
microsoft:mainfrom
PratikWayase:docs/update-hooks.md-event-name
Jul 31, 2026
Merged

docs: update hooks.md event name list and count to include sessionEnd and userPromptSubmitted#2549
WilliamBerryiii merged 3 commits into
microsoft:mainfrom
PratikWayase:docs/update-hooks.md-event-name

Conversation

@PratikWayase

Copy link
Copy Markdown
Contributor

Description

This PR updates the "Manifest Schema and Validation" section in docs/contributing/hooks.md to accurately reflect the allowed hook event names defined in the JSON schema.

The schema (scripts/linting/schemas/hook-manifest.schema.json) defines ten allowed event names, but the documentation previously stated there were "eight" and missed two in the inline enumeration. This PR updates the count from "eight" to "ten" and adds sessionEnd and userPromptSubmitted to the list so the documentation perfectly matches the schema's propertyNames.enum.

Related Issue(s)

Fixes #2498

Type of Change

Select all that apply:

Code & Documentation:

  • Bug fix (non-breaking change fixing an issue)
  • New feature (non-breaking change adding functionality)
  • Breaking change (fix or feature causing existing functionality to change)
  • Documentation update

Infrastructure & Configuration:

  • GitHub Actions workflow
  • Linting configuration (markdown, PowerShell, etc.)
  • Security configuration
  • DevContainer configuration
  • Dependency update

AI Artifacts:

  • Reviewed contribution with hve-builder and addressed all actionable findings
  • Copilot instructions (.github/instructions/*.instructions.md)
  • Copilot prompt (.github/prompts/*.prompt.md)
  • Copilot agent (.github/agents/*.agent.md)
  • Copilot skill (.github/skills/*/SKILL.md)
  • Copilot hook (.github/hooks/*/*.json)
  • Eval spec added/updated for changed AI artifacts (evals/)

Other:

  • Script/automation (.ps1, .sh, .py)
  • Other (please describe):

Testing

  • Cross-referenced the updated list of 10 events against the propertyNames.enum array in scripts/linting/schemas/hook-manifest.schema.json to ensure a 1:1 match.
  • Ran npm run lint:hooks locally to ensure no manifest validation regressions (Passed successfully).
  • Previewed the markdown file in VS Code to ensure correct rendering of inline code blocks and formatting.

Checklist

Required Checks

  • Documentation is updated (if applicable)
  • Files follow existing naming conventions
  • Changes are backwards compatible (if applicable)
  • Tests added for new functionality (if applicable)

AI Artifact Contributions

(Not applicable for this documentation-only fix)

Required Local Checks

  • Local validation aggregate: npm run validate:local
  • Documentation validation (if docs changed): npm run validate:docs
  • Spell checking: npm run spell-check
  • Link validation: npm run lint:md-links

Security Considerations

  • This PR does not contain any sensitive or NDA information
  • Any new dependencies have been reviewed for security issues
  • Security-related scripts follow the principle of least privilege

Additional Notes

This was a simple documentation mismatch introduced in PR #2478 where the schema and compatibility sections were updated, but the introductory enumeration and count were missed. No code or schema changes were required for this fix.

@PratikWayase
PratikWayase requested a review from a team as a code owner July 29, 2026 09:00
@codecov-commenter

codecov-commenter commented Jul 30, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 82.73%. Comparing base (ec2b194) to head (ae26904).

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #2549      +/-   ##
==========================================
- Coverage   82.75%   82.73%   -0.03%     
==========================================
  Files         155      155              
  Lines       20963    20943      -20     
  Branches       13       13              
==========================================
- Hits        17348    17327      -21     
- Misses       3613     3614       +1     
  Partials        2        2              
Flag Coverage Δ
docusaurus 94.44% <ø> (ø)
pester 86.19% <ø> (-0.02%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.
see 4 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@WilliamBerryiii
WilliamBerryiii merged commit e166dbc into microsoft:main Jul 31, 2026
94 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

docs: update hooks.md event name list and count to include sessionEnd and userPromptSubmitted

4 participants