Skip to content

Add lock-for-agent boolean field to issues trigger schema#6210

Merged
pelikhan merged 2 commits intomainfrom
copilot/add-lock-for-agent-field
Dec 12, 2025
Merged

Add lock-for-agent boolean field to issues trigger schema#6210
pelikhan merged 2 commits intomainfrom
copilot/add-lock-for-agent-field

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Dec 12, 2025

Foundation for issue locking feature. Adds schema support for lock-for-agent field under on.issues trigger configuration.

Changes

  • Schema: Added optional lock-for-agent boolean field to pkg/parser/schemas/main_workflow_schema.json under on.issues properties
  • Tests: Added validation test cases for both true and false values in pkg/parser/schema_test.go

Usage

---
on:
  issues:
    types: [opened, labeled]
    lock-for-agent: true
engine: copilot
---

Field is optional and backward compatible. Schema validation properly rejects non-boolean values with clear error messages.

Original prompt

This section details on the original issue you should resolve

<issue_title>[plan] Add lock-for-agent schema field to issue trigger configuration</issue_title>
<issue_description>## Objective

Add support for the lock-for-agent boolean field in the frontmatter schema under on.issue.

Context

This is the foundation for the issue locking feature. The schema must be updated to accept the new field before the compiler can use it.

Approach

  1. Update the JSON schema in pkg/parser/schemas/ to add lock-for-agent as an optional boolean field under on.issue
  2. Update the corresponding Go struct in pkg/parser/ to include the new field
  3. Run make build to rebuild the binary (schema files are embedded via //go:embed)
  4. Test by compiling a workflow with the new field to ensure schema validation passes

Files to Modify

  • pkg/parser/schemas/*.json - Add lock-for-agent field to issue trigger schema
  • pkg/parser/types.go or similar - Add field to Go struct
  • Test with a sample workflow containing on.issue.lock-for-agent: true

Acceptance Criteria

  • Schema accepts lock-for-agent as optional boolean field under on.issue
  • Go struct includes the new field with proper JSON tags
  • Binary rebuilds successfully with embedded schema
  • Test workflow with the field compiles without schema validation errors
    Related to Locking of issues #6201

AI generated by Plan Command for #6201

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


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Co-authored-by: mnkiefer <8320933+mnkiefer@users.noreply.github.com>
Copilot AI changed the title [WIP] Add lock-for-agent schema field to issue trigger configuration Add lock-for-agent boolean field to issues trigger schema Dec 12, 2025
Copilot AI requested a review from mnkiefer December 12, 2025 04:41
@pelikhan pelikhan marked this pull request as ready for review December 12, 2025 05:38
@pelikhan pelikhan merged commit b57897d into main Dec 12, 2025
5 checks passed
@pelikhan pelikhan deleted the copilot/add-lock-for-agent-field branch December 12, 2025 05:39
github-actions bot added a commit that referenced this pull request Dec 12, 2025
Add documentation for the new lock-for-agent boolean field in the
issues trigger schema. This field allows workflows to lock issues
during agent execution to prevent concurrent modifications.

Synchronized with PR #6210 merged on Dec 12, 2025.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
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] Add lock-for-agent schema field to issue trigger configuration

3 participants