Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Dec 22, 2025

The JSON schema advertised hour support (hH) in the expires field pattern, but parseRelativeTimeSpec() only implements days, weeks, months, and years. This caused runtime failures when users tried hour-based expiration based on schema validation.

Changes

Schema Updates (pkg/parser/schemas/main_workflow_schema.json):

  • Updated pattern from ^[0-9]+[hHdDwWmMyY]$ to ^[0-9]+[dDwWmMyY]$ in 3 locations:
    • create-issue expires field
    • create-discussion expires field
    • create-pull-request expires field
  • Removed '20h' from description examples

Workflow Fix (.github/workflows/slide-deck-maintainer.md):

  • Changed expires: 20h to expires: 1d

Schema validation now correctly rejects hour format:

safe-outputs:
  create-issue:
    expires: 20h  # ❌ Error: '20h' does not match pattern '^[0-9]+[dDwWmMyY]$'
    expires: 1d   # ✅ Valid

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • https://api.github.com/user
    • Triggering command: /usr/bin/gh gh api user --jq .login ithub/workflows log /opt/hostedtoolcache/go/1.25.0/x64/pkg/tool/linux_amd64/link l GOWORK 64/bin/go /opt/hostedtoolcache/go/1.25.0/x64/pkg/tool/linurev-parse -V=f�� ef/tags/v0.20.10 64/bin/go noffline l config 64/bin/go noffline (http block)
    • Triggering command: /usr/bin/gh gh api user --jq .login ithub/workflows -trimpath /usr/bin/git -p main -lang=go1.25 git rev-�� ithub/workflows -dwarf=false e/git go1.25.0 -c=4 -nolocalimports e/git (http block)
    • Triggering command: /usr/bin/gh gh api user --jq .login tags/v6 origin 5b03dc94af42c27294debc182334e5e4f2c/log.json te '**/*.cjs' '*infocmp node 64/bin/go git rev-�� k/gh-aw/gh-aw/.github/workflows husky e/git (http block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

This section details on the original issue you should resolve

<issue_title>[plan] Update expires schema pattern to remove hour support</issue_title>
<issue_description>## Objective

Update the JSON schema pattern for the expires field to match the actual implementation by removing hour (h/H) support.

Context

The schema currently advertises hour support with pattern ^[0-9]+[hHdDwWmMyY]$, but the parseRelativeTimeSpec() function doesn't implement it, causing runtime failures for users who try to use hours based on schema validation.

Approach

  1. Open pkg/parser/schemas/main_workflow_schema.json
  2. Find all occurrences of the expires field pattern (approximately 3 locations)
  3. Update pattern from ^[0-9]+[hHdDwWmMyY]$ to ^[0-9]+[dDwWmMyY]$
  4. Update description examples to remove '20h' reference if present
  5. Verify all safe-outputs types are covered

Files to Modify

  • pkg/parser/schemas/main_workflow_schema.json (update pattern at line ~3080-3094 and other locations)

Acceptance Criteria

AI generated by Plan Command for discussion #7174

Comments on the Issue (you are @copilot in this section)


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI and others added 2 commits December 22, 2025 07:15
- Updated main_workflow_schema.json to remove hH from pattern
- Changed pattern from ^[0-9]+[hHdDwWmMyY]$ to ^[0-9]+[dDwWmMyY]$
- Updated all three locations: create-issue, create-discussion, create-pull-request
- Removed '20h' from description examples
- Fixed slide-deck-maintainer.md workflow to use 1d instead of 20h
- Rebuilt binary with embedded schema changes
- Recompiled all 120 workflow files successfully

Co-authored-by: mnkiefer <[email protected]>
Copilot AI changed the title [WIP] Update expires schema pattern to remove hour support Remove hour support from expires field schema pattern Dec 22, 2025
Copilot AI requested a review from mnkiefer December 22, 2025 07:24
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.

[plan] Update expires schema pattern to remove hour support

2 participants