-
Notifications
You must be signed in to change notification settings - Fork 1
X announcement action improvements #279
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
9c5dc5d to
5a30ed2
Compare
There was a problem hiding this 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-urlinput and injects{WEBSITE_URL}into the post template. - Removes
repo-nameinput; renames and makes optional the remote template repo/branch/path inputs; addslocal-post-template-file-pathwith 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 }}" |
Copilot
AI
Feb 11, 2026
There was a problem hiding this comment.
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).
| Version: {VERSION} | ||
| Website URL: {WEBSITE_URL} | ||
| Nuget Version: {NUGET_VERSION_VAR} | ||
| Repo Name: {REPO_OWNER_VAR} |
Copilot
AI
Feb 11, 2026
There was a problem hiding this comment.
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.
| Repo Name: {REPO_OWNER_VAR} | |
| Repo Owner: {REPO_OWNER_VAR} |
| "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
AI
Feb 11, 2026
There was a problem hiding this comment.
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.
| "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. |
| 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."; |
Copilot
AI
Feb 11, 2026
There was a problem hiding this comment.
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.
| "\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."; |
| Version: {VERSION} | ||
| Website URL: {WEBSITE_URL} | ||
| Nuget Version: {NUGET_VERSION_VAR} | ||
| Repo Name: {REPO_OWNER_VAR} |
Copilot
AI
Feb 11, 2026
There was a problem hiding this comment.
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.
| Repo Name: {REPO_OWNER_VAR} | |
| Repo Owner: {REPO_OWNER_VAR} |
| "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
AI
Feb 11, 2026
There was a problem hiding this comment.
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.
| "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. |
| "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
AI
Feb 11, 2026
There was a problem hiding this comment.
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.
| "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. |
| let post = templateFileData.replaceAll(`{PROJECT_NAME}`, templateRepoName); | ||
| post = post.replaceAll(`{VERSION}`, version); | ||
| post = post.replaceAll("{WEBSITE_URL}", websiteUrl); |
Copilot
AI
Feb 11, 2026
There was a problem hiding this comment.
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.
| 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}'.`); |
Copilot
AI
Feb 11, 2026
There was a problem hiding this comment.
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.
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.