Skip to content

Conversation

@joshjohanning
Copy link
Contributor

Dependency updates:

  • Updated utils/ActionPolicy.js to use enterpriseServer315Admin instead of enterpriseServer312Admin for Octokit plugin compatibility.

Configuration changes:

  • Removed "type": "module" from package.json, potentially affecting how modules are resolved. --- @stoe I'm not sure if there is a better way here or not but after iterating a bit, this was the only working solution I could get without downgrading packages.

Committing missing file:

  • Committing sourcemap-register.js (was .cjs before the configuration change above)

Local development enhancements:

  • Added a "Local Development" section to readme.md with instructions and environment variable setup for running the project locally.

Error handling improvements:

  • Added a check in action.js to throw an error if the GITHUB_WORKSPACE environment variable is not set, improving robustness.

I tested and validated ✅ that this works here: https://github.com/joshjohanning-org/actions-allow-list-as-code/actions/runs/18046136436/job/51357225375#step:6:1

Include sourcemap-register.js in build output to resolve missing sourcemap-register.cjs runtime error.
@vercel/ncc generates broken hybrid code when it sees ES modules, causing require is not defined errors
Copilot AI review requested due to automatic review settings September 26, 2025 18:28
@joshjohanning joshjohanning requested review from a team and stoe as code owners September 26, 2025 18:28
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 fixes breaking dependency issues introduced in v3.2.0 by updating Octokit plugin imports and module configuration. The changes address compatibility problems while adding local development support and error handling improvements.

  • Updated Octokit enterprise server plugin from v3.1.2 to v3.1.5 for compatibility
  • Removed ES module configuration and switched back to CommonJS format
  • Added local development documentation and GITHUB_WORKSPACE validation

Reviewed Changes

Copilot reviewed 4 out of 9 changed files in this pull request and generated 1 comment.

File Description
utils/ActionPolicy.js Updates Octokit plugin import to use newer enterprise server version
readme.md Adds local development setup instructions with environment variables
package.json Removes ES module type configuration to fix module resolution issues
action.js Adds validation check for GITHUB_WORKSPACE environment variable

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings September 26, 2025 18:30
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

Copilot reviewed 4 out of 9 changed files in this pull request and generated no new comments.


Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@stoe stoe enabled auto-merge (squash) September 26, 2025 19:31
@stoe stoe merged commit 902e377 into ActionsDesk:main Sep 26, 2025
2 checks passed
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