Skip to content

Clarify github-token is optional for update-project when GH_AW_PROJECT_GITHUB_TOKEN is set#14996

Merged
mnkiefer merged 2 commits intoprompt-instructionsfrom
copilot/sub-pr-14984
Feb 11, 2026
Merged

Clarify github-token is optional for update-project when GH_AW_PROJECT_GITHUB_TOKEN is set#14996
mnkiefer merged 2 commits intoprompt-instructionsfrom
copilot/sub-pr-14984

Conversation

Copy link
Contributor

Copilot AI commented Feb 11, 2026

The update-project documentation incorrectly labeled github-token: as REQUIRED, but getEffectiveProjectGitHubToken falls back to ${{ secrets.GH_AW_PROJECT_GITHUB_TOKEN }} when omitted.

Changes:

  • Commented out github-token: in example to show it's optional
  • Updated inline comment: "Optional here if GH_AW_PROJECT_GITHUB_TOKEN is set; PAT with projects:write (NOT GITHUB_TOKEN) is still required"
  • Clarified requirements bullet to mention both configuration methods
  • Aligned with create-project pattern (line 556)

Before:

update-project:
  github-token: ${{ secrets.GH_AW_PROJECT_GITHUB_TOKEN }}  # REQUIRED: PAT with projects:write

After:

update-project:
  # github-token: ${{ secrets.GH_AW_PROJECT_GITHUB_TOKEN }}  # Optional here if GH_AW_PROJECT_GITHUB_TOKEN is set; PAT with projects:write is still required

A PAT with Projects permissions is always required, but configuring the github-token field is optional if the fallback secret exists.


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

…T_GITHUB_TOKEN is set

Co-authored-by: mnkiefer <8320933+mnkiefer@users.noreply.github.com>
Copilot AI changed the title [WIP] Update project prompt instructions based on feedback Clarify github-token is optional for update-project when GH_AW_PROJECT_GITHUB_TOKEN is set Feb 11, 2026
Copilot AI requested a review from mnkiefer February 11, 2026 18:07
@mnkiefer mnkiefer marked this pull request as ready for review February 11, 2026 18:07
Copilot AI review requested due to automatic review settings February 11, 2026 18:07
@mnkiefer mnkiefer merged commit caf3af2 into prompt-instructions Feb 11, 2026
@mnkiefer mnkiefer deleted the copilot/sub-pr-14984 branch February 11, 2026 18:08
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates GitHub Agentic Workflows documentation/examples to clarify that safe-outputs.update-project.github-token is optional when GH_AW_PROJECT_GITHUB_TOKEN is set, and updates the workflow lock schemas to accept temporary project IDs for update_project.

Changes:

  • Commented out github-token in the update-project docs example and clarified token configuration options (explicit field vs fallback secret).
  • Updated update_project.project input schema in workflow lock files to allow temporary project IDs (aw_… / #aw_…) in addition to full project URLs.
  • Adjusted requirements text in the docs to mention the fallback token option.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 5 comments.

File Description
.github/workflows/test-project-url-default.lock.yml Expands update_project.project tool schema to accept temporary project IDs.
.github/workflows/smoke-project.lock.yml Same schema expansion for update_project.project in the smoke workflow lock.
.github/aw/github-agentic-workflows.md Clarifies github-token optionality for update-project when fallback secret is set and updates requirements text.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

"description": "Full GitHub project URL (e.g., 'https://github.com/orgs/myorg/projects/42' or 'https://github.com/users/username/projects/5'). Project names or numbers alone are NOT accepted.",
"pattern": "^https://github\\.com/(orgs|users)/[^/]+/projects/\\d+$",
"description": "Full GitHub project URL (e.g., 'https://github.com/orgs/myorg/projects/42' or 'https://github.com/users/username/projects/5'), or a temporary project ID from a recent create_project call (e.g., '#aw_abc123def456' or 'aw_abc123def456'). Project names or numbers alone are NOT accepted.",
"pattern": "^(https://github\\.com/(orgs|users)/[^/]+/projects/\\d+|#?aw_[0-9a-f]{12})$",
Copy link

Copilot AI Feb 11, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The update_project tool input schema now allows temporary project IDs (aw_… / #aw_…), but the Safe Outputs validation schema later in this same workflow file still restricts project to a full GitHub URL (and will reject temporary IDs). Please update the corresponding validation pattern/error text as well so the workflow’s validation matches the tool schema.

Suggested change
"pattern": "^(https://github\\.com/(orgs|users)/[^/]+/projects/\\d+|#?aw_[0-9a-f]{12})$",
"pattern": "^(https://github\\.com/(orgs|users)/[^/]+/projects/\\d+|#?aw_[^\\s]+)$",

Copilot uses AI. Check for mistakes.
"description": "Full GitHub project URL (e.g., 'https://github.com/orgs/myorg/projects/42' or 'https://github.com/users/username/projects/5'). Project names or numbers alone are NOT accepted.",
"pattern": "^https://github\\.com/(orgs|users)/[^/]+/projects/\\d+$",
"description": "Full GitHub project URL (e.g., 'https://github.com/orgs/myorg/projects/42' or 'https://github.com/users/username/projects/5'), or a temporary project ID from a recent create_project call (e.g., '#aw_abc123def456' or 'aw_abc123def456'). Project names or numbers alone are NOT accepted.",
"pattern": "^(https://github\\.com/(orgs|users)/[^/]+/projects/\\d+|#?aw_[0-9a-f]{12})$",
Copy link

Copilot AI Feb 11, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same mismatch here: the update_project tool input schema accepts temporary project IDs, but the Safe Outputs validation section in this workflow still enforces a full project URL for project. Align the validation pattern/error with the updated input schema to avoid rejecting valid agent output.

Suggested change
"pattern": "^(https://github\\.com/(orgs|users)/[^/]+/projects/\\d+|#?aw_[0-9a-f]{12})$",
"pattern": "^(https://github\\.com/(orgs|users)/[^/]+/projects/\\d+|#?aw_[0-9a-z]{12})$",

Copilot uses AI. Check for mistakes.
Comment on lines +331 to +332
"description": "Full GitHub project URL (e.g., 'https://github.com/orgs/myorg/projects/42' or 'https://github.com/users/username/projects/5'), or a temporary project ID from a recent create_project call (e.g., '#aw_abc123def456' or 'aw_abc123def456'). Project names or numbers alone are NOT accepted.",
"pattern": "^(https://github\\.com/(orgs|users)/[^/]+/projects/\\d+|#?aw_[0-9a-f]{12})$",
Copy link

Copilot AI Feb 11, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The PR description/title is about clarifying github-token being optional, but this change also updates the project field schema to accept temporary project IDs from create_project. If this is intentional, it would help to mention it in the PR description (or split it) since it’s a behavior/doc contract change beyond the token clarification.

Copilot uses AI. Check for mistakes.
max: 20 # Optional: max project operations (default: 10)
project: "https://github.com/orgs/myorg/projects/42" # REQUIRED in agent output (full URL)
github-token: ${{ secrets.GH_AW_PROJECT_GITHUB_TOKEN }} # REQUIRED: PAT with projects:write (NOT GITHUB_TOKEN)
# github-token: ${{ secrets.GH_AW_PROJECT_GITHUB_TOKEN }} # Optional here if GH_AW_PROJECT_GITHUB_TOKEN is set; PAT with projects:write (NOT GITHUB_TOKEN) is still required
Copy link

Copilot AI Feb 11, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The inline comment says “PAT with projects:write”, but the requirements section below describes classic/fine-grained PAT scopes/permissions instead. Consider rewording this to “PAT/GitHub App token with Projects permissions” (or similar) to avoid implying there’s a PAT scope literally named projects:write.

Suggested change
# github-token: ${{ secrets.GH_AW_PROJECT_GITHUB_TOKEN }} # Optional here if GH_AW_PROJECT_GITHUB_TOKEN is set; PAT with projects:write (NOT GITHUB_TOKEN) is still required
# github-token: ${{ secrets.GH_AW_PROJECT_GITHUB_TOKEN }} # Optional here if GH_AW_PROJECT_GITHUB_TOKEN is set; PAT or GitHub App token with Projects permissions (NOT GITHUB_TOKEN) is still required

Copilot uses AI. Check for mistakes.
Comment on lines 579 to +581
- Agent must include full project URL in **every** call: `project: "https://github.com/orgs/myorg/projects/42"` or `https://github.com/users/username/projects/5`
- Project URLs must be full URLs; project numbers alone are NOT accepted
- Requires a **PAT or GitHub App token** with Projects permissions configured as `github-token: ${{ secrets.GH_AW_PROJECT_GITHUB_TOKEN }}`
- Requires a **PAT or GitHub App token** with Projects permissions (for example via `github-token: ${{ secrets.GH_AW_PROJECT_GITHUB_TOKEN }}` or the `GH_AW_PROJECT_GITHUB_TOKEN` fallback)
Copy link

Copilot AI Feb 11, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This requirements bullet still states the agent must include a full project URL in every call, but the update_project schema now allows temporary project IDs (aw_… / #aw_…) from create_project. Please update the requirement wording/examples to include temporary IDs (or explicitly state when a full URL is still required) so the docs match the actual accepted inputs.

See below for a potential fix:

        project: "https://github.com/orgs/myorg/projects/42"  # REQUIRED in agent output: full project URL or temporary project ID (e.g., aw_… / #aw_… from create_project)
        # github-token: ${{ secrets.GH_AW_PROJECT_GITHUB_TOKEN }}  # Optional here if GH_AW_PROJECT_GITHUB_TOKEN is set; PAT with projects:write (NOT GITHUB_TOKEN) is still required
    ```
    Use this to organize work by adding issues and pull requests to projects, updating field values (status, priority, effort, dates), creating custom fields, and setting up project views.
    
    **⚠️ IMPORTANT REQUIREMENTS:**
    - Agent must include a project identifier in **every** call: either a full project URL (e.g., `project: "https://github.com/orgs/myorg/projects/42"` or `https://github.com/users/username/projects/5"`) or a temporary project ID returned from `create_project` (e.g., `aw_abc123def456` or `#aw_abc123def456`)
    - When using project URLs, they must be full URLs; bare project numbers alone are NOT accepted (temporary project IDs starting with `aw_` or `#aw_` are allowed)

Copilot uses AI. Check for mistakes.
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

Comments