Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Jan 30, 2026

Safe outputs update-project and create-project-status-update now use the project.url from frontmatter as a default when messages don't specify an explicit project field.

Changes

  • Compiler (pkg/workflow/compiler_safe_outputs_steps.go): Added GH_AW_PROJECT_URL environment variable to project handler manager step when project.url is configured in frontmatter

  • JavaScript handlers: Modified update_project.cjs and create_project_status_update.cjs to check process.env.GH_AW_PROJECT_URL when message doesn't specify project field

  • Precedence: Explicit project field in safe output message always overrides frontmatter default

Example

Frontmatter:

project:
  url: "https://github.com/orgs/myorg/projects/123"

safe-outputs:
  update-project:
    max: 5

Safe output message (project URL omitted):

{
  "type": "update_project",
  "content_type": "draft_issue",
  "draft_title": "New item",
  "fields": {"status": "Todo"}
}

The handler automatically uses https://github.com/orgs/myorg/projects/123 from frontmatter. If the message includes "project": "https://github.com/orgs/other/projects/456", that explicit value takes precedence.

Backward compatible—workflows without frontmatter project configuration or with explicit message-level project fields behave identically.

Original prompt

Update the compiler to pass the value of the frontmatter field "project" to the safe-outputs step that handles project related safe outout entries.

The safe output like update-project or create-project-status-update should use this value by default (target=context). The user can override this if target=*.


✨ 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 4 commits January 30, 2026 06:44
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
…utputs

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI changed the title [WIP] Update compiler to pass project field to safe outputs Pass project URL from frontmatter to safe output handlers as default Jan 30, 2026
@pelikhan pelikhan marked this pull request as ready for review January 30, 2026 07:03
@pelikhan pelikhan merged commit fd9d155 into main Jan 30, 2026
126 checks passed
@pelikhan pelikhan deleted the copilot/update-compiler-safe-outputs branch January 30, 2026 07:07
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.

2 participants