diff --git a/actions/setup/js/create_discussion.cjs b/actions/setup/js/create_discussion.cjs index fa6545c82b..de2a382380 100644 --- a/actions/setup/js/create_discussion.cjs +++ b/actions/setup/js/create_discussion.cjs @@ -99,7 +99,7 @@ function resolveCategoryId(categoryConfig, itemCategory, categories) { } } - // Fall back to announcement-capable category if available, otherwise first category + // Fall back to "Announcements" category if available, otherwise first category if (categories.length > 0) { // Try to find an "Announcements" category (case-insensitive) const announcementCategory = categories.find(cat => cat.name.toLowerCase() === "announcements" || cat.slug.toLowerCase() === "announcements"); @@ -261,7 +261,7 @@ function isPermissionsError(errorMessage) { async function handleFallbackToIssue(createIssueHandler, item, qualifiedItemRepo, resolvedTemporaryIds, contextMessage) { try { // Prepare issue message with a note about the fallback - const fallbackNote = `\n\n---\n\n> [!WARNING]\n> This was intended to be a discussion, but discussions could not be created due to permissions issues. This issue was created as a fallback.\n>\n> Discussion creation may fail if the specified category is not announcement-capable. Consider using the "Announcements" category or another announcement-capable category in your workflow configuration.\n`; + const fallbackNote = `\n\n---\n\n> [!WARNING]\n> This was intended to be a discussion, but discussions could not be created due to permissions issues. This issue was created as a fallback.\n`; const issueMessage = { ...item, body: (item.body || "") + fallbackNote, diff --git a/docs/src/content/docs/agent-factory-status.mdx b/docs/src/content/docs/agent-factory-status.mdx index 91412544dc..af5e5655ce 100644 --- a/docs/src/content/docs/agent-factory-status.mdx +++ b/docs/src/content/docs/agent-factory-status.mdx @@ -60,6 +60,7 @@ These are experimental agentic workflows used by the GitHub Next team to learn, | [Daily Fact About gh-aw](https://github.com/github/gh-aw/blob/main/.github/workflows/daily-fact.md) | codex | [![Daily Fact About gh-aw](https://github.com/github/gh-aw/actions/workflows/daily-fact.lock.yml/badge.svg)](https://github.com/github/gh-aw/actions/workflows/daily-fact.lock.yml) | `0 11 * * 1-5` | - | | [Daily File Diet](https://github.com/github/gh-aw/blob/main/.github/workflows/daily-file-diet.md) | copilot | [![Daily File Diet](https://github.com/github/gh-aw/actions/workflows/daily-file-diet.lock.yml/badge.svg)](https://github.com/github/gh-aw/actions/workflows/daily-file-diet.lock.yml) | `0 13 * * 1-5` | - | | [Daily Firewall Logs Collector and Reporter](https://github.com/github/gh-aw/blob/main/.github/workflows/daily-firewall-report.md) | copilot | [![Daily Firewall Logs Collector and Reporter](https://github.com/github/gh-aw/actions/workflows/daily-firewall-report.lock.yml/badge.svg)](https://github.com/github/gh-aw/actions/workflows/daily-firewall-report.lock.yml) | - | - | +| [Daily Go Function Namer](https://github.com/github/gh-aw/blob/main/.github/workflows/daily-function-namer.md) | claude | [![Daily Go Function Namer](https://github.com/github/gh-aw/actions/workflows/daily-function-namer.lock.yml/badge.svg)](https://github.com/github/gh-aw/actions/workflows/daily-function-namer.lock.yml) | - | - | | [Daily Issues Report Generator](https://github.com/github/gh-aw/blob/main/.github/workflows/daily-issues-report.md) | codex | [![Daily Issues Report Generator](https://github.com/github/gh-aw/actions/workflows/daily-issues-report.lock.yml/badge.svg)](https://github.com/github/gh-aw/actions/workflows/daily-issues-report.lock.yml) | - | - | | [Daily Malicious Code Scan Agent](https://github.com/github/gh-aw/blob/main/.github/workflows/daily-malicious-code-scan.md) | copilot | [![Daily Malicious Code Scan Agent](https://github.com/github/gh-aw/actions/workflows/daily-malicious-code-scan.lock.yml/badge.svg)](https://github.com/github/gh-aw/actions/workflows/daily-malicious-code-scan.lock.yml) | - | - | | [Daily MCP Tool Concurrency Analysis](https://github.com/github/gh-aw/blob/main/.github/workflows/daily-mcp-concurrency-analysis.md) | copilot | [![Daily MCP Tool Concurrency Analysis](https://github.com/github/gh-aw/actions/workflows/daily-mcp-concurrency-analysis.lock.yml/badge.svg)](https://github.com/github/gh-aw/actions/workflows/daily-mcp-concurrency-analysis.lock.yml) | `0 9 * * 1-5` | - | diff --git a/docs/src/content/docs/reference/faq.md b/docs/src/content/docs/reference/faq.md index beaafa83c9..c599dbc754 100644 --- a/docs/src/content/docs/reference/faq.md +++ b/docs/src/content/docs/reference/faq.md @@ -246,16 +246,16 @@ Yes! Use [TrialOps](/gh-aw/patterns/trial-ops/) to test workflows in isolated tr See [Common Issues](/gh-aw/troubleshooting/common-issues/) for detailed troubleshooting guidance including workflow failures, debugging strategies, permission issues, and network problems. -### Why is my create-discussion workflow failing with integration-forbidden? - -Discussion creation requires announcement-capable categories. If your workflow fails with an `integration-forbidden` error, ensure the `category` field in your configuration specifies a category that has announcement capabilities enabled in your repository's discussion settings. +### Why is my create-discussion workflow failing? Common issues: -- **Non-announcement categories**: Only categories configured to support announcements can be used for automated discussion creation. Check your repository's discussion settings to verify which categories have announcement capabilities. -- **Category name typos**: Verify the category name spelling in your workflow configuration matches exactly with your repository's discussion categories. Category names are case-sensitive. + +- **Category name typos**: Verify the category name spelling in your workflow configuration matches your repository's discussion categories. Category names are matched case-insensitively, but check for typos. - **Category slugs**: Use lowercase category slugs (e.g., `general`, `announcements`) rather than display names for better reliability. +- **Discussions not enabled**: Ensure discussions are enabled for your repository in **Settings → Features → Discussions**. +- **Insufficient permissions**: The workflow requires `discussions: write` permission. -If discussions are not enabled or the category lacks announcement capabilities, consider using `fallback-to-issue: true` (the default) to automatically create an issue instead. See [Discussion Creation](/gh-aw/reference/safe-outputs/#discussion-creation-create-discussion) for configuration details. +If discussions are not enabled or the workflow lacks permissions, consider using `fallback-to-issue: true` (the default) to automatically create an issue instead. See [Discussion Creation](/gh-aw/reference/safe-outputs/#discussion-creation-create-discussion) for configuration details. ### Why is my create-pull-request workflow failing with "GitHub Actions is not permitted to create or approve pull requests"? diff --git a/docs/src/content/docs/reference/safe-outputs.md b/docs/src/content/docs/reference/safe-outputs.md index d42b622582..00430e352b 100644 --- a/docs/src/content/docs/reference/safe-outputs.md +++ b/docs/src/content/docs/reference/safe-outputs.md @@ -946,14 +946,11 @@ Creates discussions with optional `category` (slug, name, or ID; defaults to fir **Category Naming Standard**: Use lowercase, plural category names (e.g., `audits`, `general`, `reports`) for consistency and better searchability. GitHub Discussion category IDs (starting with `DIC_`) are also supported. -> [!WARNING] -> Only announcement-capable category succeeds; all non-announcement categories fail with integration-forbidden. - ```yaml wrap safe-outputs: create-discussion: title-prefix: "[ai] " # prefix for titles - category: "announcements" # category slug, name, or ID (use lowercase, prefer announcement-capable) + category: "announcements" # category slug, name, or ID (use lowercase) expires: 3 # auto-close after 3 days (or false to disable) max: 3 # max discussions (default: 1) target-repo: "owner/repo" # cross-repository