Skip to content

Conversation

@CalvinWilkinson
Copy link
Member

Description

The goal of this pull request is to implement the changes described in the linked issue.
This pull request closes #276.

Unrelated Changes

List the changes that were made that were unrelated to the linked issue.

Reviewer Notes

Add additional notes about what the reviewer should focus on.

@CalvinWilkinson CalvinWilkinson added this to the vnext milestone Feb 11, 2026
@CalvinWilkinson CalvinWilkinson added high-priority High Priority 🧨breaking-changes Feature/changes contains breaking changes area:actions Updates to any of the custom GitHub actions. labels Feb 11, 2026
@CalvinWilkinson CalvinWilkinson self-assigned this Feb 11, 2026
@github-project-automation github-project-automation bot moved this to ⚪Not Set in KD-Team Feb 11, 2026
@CalvinWilkinson CalvinWilkinson force-pushed the feature/276-send-x-post-improvements branch from 9c5dc5d to 5a30ed2 Compare February 11, 2026 23:06
@CalvinWilkinson CalvinWilkinson marked this pull request as ready for review February 11, 2026 23:07
Copilot AI review requested due to automatic review settings February 11, 2026 23:07
@github-project-automation github-project-automation bot moved this from ⚪Not Set to ↪️PR Complete (Needs Merging) in KD-Team Feb 11, 2026
@CalvinWilkinson CalvinWilkinson merged commit e3de323 into main Feb 11, 2026
10 checks passed
@CalvinWilkinson CalvinWilkinson deleted the feature/276-send-x-post-improvements branch February 11, 2026 23:08
@github-project-automation github-project-automation bot moved this from ↪️PR Complete (Needs Merging) to ✅Done in KD-Team Feb 11, 2026
Copy link

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

Implements the enhancements requested in issue #276 for the send-x-release-announcement composite action, focusing on input renames/optionality and expanded template sourcing options.

Changes:

  • Adds optional website-url input and injects {WEBSITE_URL} into the post template.
  • Removes repo-name input; renames and makes optional the remote template repo/branch/path inputs; adds local-post-template-file-path with precedence over remote inputs.
  • Updates local development/debug configuration and lockfile entries to support the new filesystem check.

Reviewed changes

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

Show a summary per file
File Description
deno.lock Updates locked std module versions to support new filesystem usage.
actions/send-x-release-announcement/send-x-release-announcement.ts Implements new optional inputs, remote-vs-local template selection, and {WEBSITE_URL} replacement.
actions/send-x-release-announcement/action.yml Updates action inputs/env wiring (renames, optionality, new local template path, website URL).
actions/send-x-release-announcement/remote-test-template.txt Adds a sample remote template demonstrating placeholders.
actions/send-x-release-announcement/local-test-template.txt Adds a sample local template demonstrating placeholders.
.vscode/launch.json Updates local debug entry to run the new action script and new env var names.

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

POST_TEMPLATE_REPO_NAME: "${{ inputs.post-template-repo-name }}"
POST_TEMPLATE_BRANCH_NAME: "${{ inputs.post-template-branch-name }}"
POST_TEMPLATE_REPO_RELATIVE_FILE_PATH: "${{ inputs.post-template-repo-relative-file-path }}"
LOCAL_POST_TEMPLATE_FILE_PATH: "${{ inputs.local-post-template-file-path }}"
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.

LOCAL_POST_TEMPLATE_FILE_PATH enables loading a local template via filesystem APIs (existsSync / Deno.readTextFile), but the composite step currently runs Deno with -EN only (no read permission). When a local template path is provided, the action will fail with a permission error unless --allow-read is added (ideally scoped to the workspace / provided path).

Copilot uses AI. Check for mistakes.
Version: {VERSION}
Website URL: {WEBSITE_URL}
Nuget Version: {NUGET_VERSION_VAR}
Repo Name: {REPO_OWNER_VAR}
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.

Label mismatch: this line says "Repo Name" but the placeholder is {REPO_OWNER_VAR} (owner, not repo). Consider renaming the label to "Repo Owner" to avoid confusion in the template example.

Suggested change
Repo Name: {REPO_OWNER_VAR}
Repo Owner: {REPO_OWNER_VAR}

Copilot uses AI. Check for mistakes.
Comment on lines +23 to +37
"The branch name of the repository containing the release X post template.
This input requires the use of the 'post-template-repo-name' and 'post-template-repo-relative-file-path' inputs.
Using the 'local-post-template-file-path' input takes precedence over this input."
required: false
post-template-repo-relative-file-path:
description: |
"The relative file path to the release X post template within the repository set by
the 'post-template-repo-name' and 'post-template-branch-name' inputs. This input
requires the use of the 'post-template-repo-name' and 'post-template-branch-name' inputs.
Using the 'local-post-template-file-path' input takes precedence over this input."
required: false
local-post-template-file-path:
description: |
"The file path to the release X post template within the repository.
This input takes precedence over the 'post-template-repo-name', 'post-template-branch-name', and 'post-template-repo-relative-file-path' inputs."
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 description: | block for post-template-branch-name includes surrounding double-quotes on each line, which become part of the rendered description text. Remove the extra quotes (or switch to a normal YAML string) so the input description is displayed correctly.

Suggested change
"The branch name of the repository containing the release X post template.
This input requires the use of the 'post-template-repo-name' and 'post-template-repo-relative-file-path' inputs.
Using the 'local-post-template-file-path' input takes precedence over this input."
required: false
post-template-repo-relative-file-path:
description: |
"The relative file path to the release X post template within the repository set by
the 'post-template-repo-name' and 'post-template-branch-name' inputs. This input
requires the use of the 'post-template-repo-name' and 'post-template-branch-name' inputs.
Using the 'local-post-template-file-path' input takes precedence over this input."
required: false
local-post-template-file-path:
description: |
"The file path to the release X post template within the repository.
This input takes precedence over the 'post-template-repo-name', 'post-template-branch-name', and 'post-template-repo-relative-file-path' inputs."
The branch name of the repository containing the release X post template.
This input requires the use of the 'post-template-repo-name' and 'post-template-repo-relative-file-path' inputs.
Using the 'local-post-template-file-path' input takes precedence over this input.
required: false
post-template-repo-relative-file-path:
description: |
The relative file path to the release X post template within the repository set by
the 'post-template-repo-name' and 'post-template-branch-name' inputs. This input
requires the use of the 'post-template-repo-name' and 'post-template-branch-name' inputs.
Using the 'local-post-template-file-path' input takes precedence over this input.
required: false
local-post-template-file-path:
description: |
The file path to the release X post template within the repository.
This input takes precedence over the 'post-template-repo-name', 'post-template-branch-name', and 'post-template-repo-relative-file-path' inputs.

Copilot uses AI. Check for mistakes.
const errorMsg = "Missing required inputs for the release announcement post template." +
"\nPlease provide either the 'local-post-template-file-path' input value or all of the " +
"('post-template-repo-name', 'post-template-branch-name', 'post-template-repo-relative-file-path') input values." +
"\nThe input 'local-post-template-file-path' input takes precedence over the repository template inputs.";
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.

Minor wording issue in this error message: "The input 'local-post-template-file-path' input takes precedence..." repeats the word "input". Consider rephrasing to avoid the duplication for clarity.

Suggested change
"\nThe input 'local-post-template-file-path' input takes precedence over the repository template inputs.";
"\nThe 'local-post-template-file-path' input takes precedence over the repository template inputs.";

Copilot uses AI. Check for mistakes.
Version: {VERSION}
Website URL: {WEBSITE_URL}
Nuget Version: {NUGET_VERSION_VAR}
Repo Name: {REPO_OWNER_VAR}
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.

Label mismatch: this line says "Repo Name" but the placeholder is {REPO_OWNER_VAR} (owner, not repo). Consider renaming the label to "Repo Owner" to avoid confusion in the template example.

Suggested change
Repo Name: {REPO_OWNER_VAR}
Repo Owner: {REPO_OWNER_VAR}

Copilot uses AI. Check for mistakes.
Comment on lines +23 to +37
"The branch name of the repository containing the release X post template.
This input requires the use of the 'post-template-repo-name' and 'post-template-repo-relative-file-path' inputs.
Using the 'local-post-template-file-path' input takes precedence over this input."
required: false
post-template-repo-relative-file-path:
description: |
"The relative file path to the release X post template within the repository set by
the 'post-template-repo-name' and 'post-template-branch-name' inputs. This input
requires the use of the 'post-template-repo-name' and 'post-template-branch-name' inputs.
Using the 'local-post-template-file-path' input takes precedence over this input."
required: false
local-post-template-file-path:
description: |
"The file path to the release X post template within the repository.
This input takes precedence over the 'post-template-repo-name', 'post-template-branch-name', and 'post-template-repo-relative-file-path' inputs."
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 issue as above: this description: | block includes literal double-quotes that will show up in the rendered input docs. Remove the extra quotes so the description is clean and consistent.

Suggested change
"The branch name of the repository containing the release X post template.
This input requires the use of the 'post-template-repo-name' and 'post-template-repo-relative-file-path' inputs.
Using the 'local-post-template-file-path' input takes precedence over this input."
required: false
post-template-repo-relative-file-path:
description: |
"The relative file path to the release X post template within the repository set by
the 'post-template-repo-name' and 'post-template-branch-name' inputs. This input
requires the use of the 'post-template-repo-name' and 'post-template-branch-name' inputs.
Using the 'local-post-template-file-path' input takes precedence over this input."
required: false
local-post-template-file-path:
description: |
"The file path to the release X post template within the repository.
This input takes precedence over the 'post-template-repo-name', 'post-template-branch-name', and 'post-template-repo-relative-file-path' inputs."
The branch name of the repository containing the release X post template.
This input requires the use of the 'post-template-repo-name' and 'post-template-repo-relative-file-path' inputs.
Using the 'local-post-template-file-path' input takes precedence over this input.
required: false
post-template-repo-relative-file-path:
description: |
The relative file path to the release X post template within the repository set by
the 'post-template-repo-name' and 'post-template-branch-name' inputs. This input
requires the use of the 'post-template-repo-name' and 'post-template-branch-name' inputs.
Using the 'local-post-template-file-path' input takes precedence over this input.
required: false
local-post-template-file-path:
description: |
The file path to the release X post template within the repository.
This input takes precedence over the 'post-template-repo-name', 'post-template-branch-name', and 'post-template-repo-relative-file-path' inputs.

Copilot uses AI. Check for mistakes.
Comment on lines +23 to +37
"The branch name of the repository containing the release X post template.
This input requires the use of the 'post-template-repo-name' and 'post-template-repo-relative-file-path' inputs.
Using the 'local-post-template-file-path' input takes precedence over this input."
required: false
post-template-repo-relative-file-path:
description: |
"The relative file path to the release X post template within the repository set by
the 'post-template-repo-name' and 'post-template-branch-name' inputs. This input
requires the use of the 'post-template-repo-name' and 'post-template-branch-name' inputs.
Using the 'local-post-template-file-path' input takes precedence over this input."
required: false
local-post-template-file-path:
description: |
"The file path to the release X post template within the repository.
This input takes precedence over the 'post-template-repo-name', 'post-template-branch-name', and 'post-template-repo-relative-file-path' inputs."
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.

For local-post-template-file-path, the description doesn't mention that the caller must have the repository checked out (e.g., via actions/checkout) and that the path is relative to the workspace. Also, the description: | block currently includes literal double-quotes that will be rendered in the docs; remove those quotes while updating the wording.

Suggested change
"The branch name of the repository containing the release X post template.
This input requires the use of the 'post-template-repo-name' and 'post-template-repo-relative-file-path' inputs.
Using the 'local-post-template-file-path' input takes precedence over this input."
required: false
post-template-repo-relative-file-path:
description: |
"The relative file path to the release X post template within the repository set by
the 'post-template-repo-name' and 'post-template-branch-name' inputs. This input
requires the use of the 'post-template-repo-name' and 'post-template-branch-name' inputs.
Using the 'local-post-template-file-path' input takes precedence over this input."
required: false
local-post-template-file-path:
description: |
"The file path to the release X post template within the repository.
This input takes precedence over the 'post-template-repo-name', 'post-template-branch-name', and 'post-template-repo-relative-file-path' inputs."
The branch name of the repository containing the release X post template.
This input requires the use of the 'post-template-repo-name' and 'post-template-repo-relative-file-path' inputs.
Using the 'local-post-template-file-path' input takes precedence over this input.
required: false
post-template-repo-relative-file-path:
description: |
The relative file path to the release X post template within the repository set by
the 'post-template-repo-name' and 'post-template-branch-name' inputs. This input
requires the use of the 'post-template-repo-name' and 'post-template-branch-name' inputs.
Using the 'local-post-template-file-path' input takes precedence over this input.
required: false
local-post-template-file-path:
description: |
The file path to the release X post template within the checked-out repository, relative to the GitHub Actions workspace.
The caller must check out the repository (for example, using 'actions/checkout') before using this input.
This input takes precedence over the 'post-template-repo-name', 'post-template-branch-name', and 'post-template-repo-relative-file-path' inputs.

Copilot uses AI. Check for mistakes.
Comment on lines +134 to +136
let post = templateFileData.replaceAll(`{PROJECT_NAME}`, templateRepoName);
post = post.replaceAll(`{VERSION}`, version);
post = post.replaceAll("{WEBSITE_URL}", websiteUrl);
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.

{PROJECT_NAME} is being replaced with templateRepoName, which is the repo that hosts the template. When local-post-template-file-path is used (or when templates are stored in a different repo), templateRepoName may be empty or not the project being released, causing incorrect posts. Consider deriving the project name from GITHUB_REPOSITORY (or adding a dedicated input) and use that for {PROJECT_NAME} and related messaging.

Copilot uses AI. Check for mistakes.
await xClient.tweet(post);

printAsGitHubNotice(`A release X post was successfully broadcasted for the '${repoName}' project for version '${version}'.`);
printAsGitHubNotice(`A release X post was successfully broadcasted for the '${templateRepoName}' project for version '${version}'.`);
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 success notice uses templateRepoName as the project name. If a local template is used (or the template is stored in a separate repo), this message can be empty or misleading. Use the actual project repository name (e.g., parsed from GITHUB_REPOSITORY) instead.

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

area:actions Updates to any of the custom GitHub actions. 🧨breaking-changes Feature/changes contains breaking changes high-priority High Priority

Projects

Status: ✅Done

Development

Successfully merging this pull request may close these issues.

X announcement action improvements

2 participants