Skip to content

feat: accept separate owner/number params and temporary IDs for project safe outputs#19045

Draft
Copilot wants to merge 3 commits intomainfrom
copilot/rethink-safe-outputs-structure
Draft

feat: accept separate owner/number params and temporary IDs for project safe outputs#19045
Copilot wants to merge 3 commits intomainfrom
copilot/rethink-safe-outputs-structure

Conversation

Copy link
Contributor

Copilot AI commented Mar 1, 2026

Projects are org/user-scoped, not repo-scoped — there's no reason they require a full URL when separate owner and number fields provide all necessary information. Additionally, create_project_status_update couldn't reference projects created in the same run, blocking chaining workflows.

Changes

  • Separate owner and number params: update_project and create_project_status_update now accept "owner": "myorg", "number": 42 as two explicit fields in addition to full URLs. Scope (org vs user) is resolved automatically at lookup time — org tried first, then user. Full URLs continue to work unchanged.

  • Temporary ID support in create_project_status_update: The handler now resolves aw_xxx project references from the unified temporary ID map, enabling chaining:

    {"type": "create_project", "temporary_id": "aw_proj1", "title": "My Project"}
    {"type": "create_project_status_update", "owner": "myorg", "number": 42, "body": "Project created!"}
  • Schema in safe_outputs_tools.json updated for both tools: project field accepts full URL or temporary ID; new owner (string) and number (integer) fields added.

  • Docs updated to show owner/number as separate fields and document chaining via temporary IDs.

Accepted project reference formats (now consistent across both tools)

Format Example
Separate params "owner": "myorg", "number": 42
Full URL https://github.com/orgs/myorg/projects/42
Temporary ID aw_abc1 / #aw_abc1

🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.

Copilot AI and others added 2 commits March 1, 2026 11:50
…tputs

Co-authored-by: mnkiefer <8320933+mnkiefer@users.noreply.github.com>
@mnkiefer
Copy link
Contributor

mnkiefer commented Mar 1, 2026

@copilot Better to have org/number as two separate parameters (instead of myorg/42 as. myorg, and 42.

…mbined string

Co-authored-by: mnkiefer <8320933+mnkiefer@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Mar 1, 2026

@copilot Better to have org/number as two separate parameters (instead of myorg/42 as. myorg, and 42.

Done in 042142a. Both update_project and create_project_status_update now accept owner and number as two separate fields instead of the combined myorg/42 string. The schema, handlers, tests, and docs have all been updated accordingly.

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/repos/github/gh-aw/contents/.github%2Fworkflows%2Faudit-workflows.md
    • Triggering command: /opt/hostedtoolcache/node/24.13.1/x64/bin/node /opt/hostedtoolcache/node/24.13.1/x64/bin/node --conditions node --conditions development --experimental-import-meta-resolve --require /home/REDACTED/work/gh-aw/gh-aw/actions/setup/js/node_modules/vitest/suppress-warnings.cjs /home/REDACTED/work/gh-aw/gh-aw/actions/setup/js/node_modules/vitest/dist/workers/forks.js m ode_modules/.bin--verify git push�� -u origin ache/node/24.13.1/x64/bin/git 5NPCH git run-script/lib/node-gyp-bin/git git (http block)
    • Triggering command: /opt/hostedtoolcache/node/24.13.1/x64/bin/node /opt/hostedtoolcache/node/24.13.1/x64/bin/node --conditions node --conditions development --experimental-import-meta-resolve --require /home/REDACTED/work/gh-aw/gh-aw/actions/setup/js/node_modules/vitest/suppress-warnings.cjs /home/REDACTED/work/gh-aw/gh-aw/actions/setup/js/node_modules/vitest/dist/workers/forks.js --format=%s ode_modules/vite--noprofile ode_modules/vitest/dist/workers/forks.js /hom�� 218169/b001/parser.test git 64/pkg/tool/linux_amd64/asm ve git tions/setup/js/nvitest 64/pkg/tool/linurun (http block)

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

Copilot AI changed the title feat: accept owner/number shorthand and temporary IDs for project safe outputs feat: accept separate owner/number params and temporary IDs for project safe outputs Mar 1, 2026
@github-actions github-actions bot mentioned this pull request Mar 1, 2026
@github-actions

This comment has been minimized.

@github-actions
Copy link
Contributor

github-actions bot commented Mar 1, 2026

Hey @mnkiefer 👋 — great work on this feature! The ergonomics improvement of allowing owner + number as separate fields instead of requiring a full URL is a real quality-of-life win for agents, and the temporary-ID chaining for create_project_status_update unlocks some useful multi-step workflow patterns.

One gap to close before this is ready for review:

  • Add tests for the new code pathscreate_project_status_update.test.cjs and update_project.test.cjs already exist (Vitest, .test.cjs convention) but the diff doesn't include updates to either. The new resolveProjectInfo function, the scope: null auto-detection fallback in resolveProjectV2, and the temporary-ID resolution branch in the create_project_status_update handler all need coverage.
Update the existing Vitest test files for the safe-outputs project tools to cover the new code paths added in PR #19045:
1. In `create_project_status_update.test.cjs` — add tests for temporary-ID resolution (e.g. `aw_proj1` resolves to the correct project reference via the unified temp-ID map).
2. In `update_project.test.cjs` — add tests for the new `owner` + `number` separate-params path and the full URL path via `resolveProjectInfo`.
3. In `update_project.test.cjs` — add a test for the `scope: null` auto-detection loop in `resolveProjectV2`.
Run `make lint-cjs` and `make fmt-cjs` before pushing.

Generated by Contribution Check

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