Skip to content

Update Release + Versioning #65

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

Merged
merged 3 commits into from
Feb 19, 2025
Merged

Update Release + Versioning #65

merged 3 commits into from
Feb 19, 2025

Conversation

GrantBirki
Copy link
Member

This pull request updates the way this Action gets released by using a src/version.js file containing the version (same as with github/branch-deploy). It also includes the project name and version via a user-agent when making API requests.

@Copilot Copilot bot review requested due to automatic review settings February 19, 2025 21:48
Copy link

@Copilot 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.

PR Overview

This PR updates the release and versioning mechanism by introducing a dedicated src/version.js file to define the version constant and injecting it into user-agent strings for API calls.

  • Introduces tests in tests/version.test.js that validate the version format with a regex.
  • Exports a version constant from src/version.js and updates user-agent strings in src/main.js and src/functions/post.js with the version information.

Reviewed Changes

File Description
tests/version.test.js Adds tests to validate version strings conform to expected formats.
src/version.js Defines the VERSION constant, with updated version comments and examples.
src/main.js Imports VERSION and logs it, and includes it in the octokit user-agent.
src/functions/post.js Updates octokit instantiation to include the new VERSION in the user-agent.

Copilot reviewed 7 out of 7 changed files in this pull request and generated no comments.

Comments suppressed due to low confidence (3)

src/main.js:18

  • Consider adding tests to verify that the user-agent string is logged correctly, as well as checking that it is formed as expected when the VERSION changes.
core.info(`🛸 github/command ${COLORS.info}${VERSION}${COLORS.reset}`)

src/main.js:31

  • Consider adding tests to confirm that the octokit client is configured with the correct user-agent, particularly ensuring the VERSION is correctly appended.
userAgent: `github/command@${VERSION}`,

src/functions/post.js:42

  • Consider adding tests to verify that the user-agent is correctly set in the octokit client within this module, ensuring consistency with the versioning change.
userAgent: `github/command@${VERSION}`,

Tip: Copilot only keeps its highest confidence comments to reduce noise and keep you focused. Learn more

@GrantBirki GrantBirki merged commit 07fa648 into main Feb 19, 2025
4 checks passed
@GrantBirki GrantBirki deleted the version branch February 19, 2025 21:52
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.

1 participant