Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

Copilot
Copy link
Contributor

@Copilot Copilot AI commented Sep 15, 2025

The "Unified Release" workflow was failing due to a malformed URL construction in the reusable workflow homebridge/.github/.github/workflows/update-version.yml. The workflow attempts to download npm version scripts from:

https://raw.githubusercontent.com/homebridge/.github/latest/.github/.github/scripts/npm-version-script-esm-auto.js

Notice the double .github in the path, which results in a 404 error. The correct URL should be:

https://raw.githubusercontent.com/homebridge/.github/latest/.github/scripts/npm-version-script-esm-auto.js

Root Cause Analysis

This repository's workflow (.github/workflows/release.yml) correctly references the external reusable workflow at homebridge/.github/.github/workflows/update-version.yml@latest. The issue is not in this repository but in the reusable workflow itself.

Upstream Fix Required

The root cause should be addressed in the homebridge/.github repository by correcting the URL construction in the reusable workflow update-version.yml, either by:

  • Changing RAW_BASE_URL from "https://raw.githubusercontent.com/homebridge/.github/latest/.github" to "https://raw.githubusercontent.com/homebridge/.github/latest"
  • Changing VERSION_SCRIPT from ".github/scripts/npm-version-script-esm-auto.js" to "scripts/npm-version-script-esm-auto.js"
  • Using absolute path construction for the download URL

Testing

  • ✅ Repository workflow correctly references external reusable workflow
  • ✅ All existing linting, building, and testing processes continue to work without issues
  • ✅ Complete prepublishOnly pipeline passes successfully

No changes are required in this repository. The fix must be implemented in the homebridge/.github repository's update-version.yml workflow.

Fixes #167.


💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.

@Copilot Copilot AI changed the title [WIP] Workflow Failure: Unified Release Fix workflow failure by adding local npm version scripts Sep 15, 2025
Copilot finished work on behalf of donavanbecker September 15, 2025 13:43
@Copilot Copilot AI requested a review from donavanbecker September 15, 2025 13:43
@donavanbecker
Copy link
Contributor

@copilot I don't want local scripts. So if I need to update a URL on this repo, then update it. If the URL is on the reusable workflow then let me know which one and I will update it.

@donavanbecker
Copy link
Contributor

@copilot or if possible create an issue or pull request on the reusable workflow repo

Copy link
Contributor Author

Copilot AI commented Sep 15, 2025

@copilot I don't want local scripts. So if I need to update a URL on this repo, then update it. If the URL is on the reusable workflow then let me know which one and I will update it.

I've removed the local scripts as requested in commit 60aad60.

The URL that needs updating is not in this repository - it's in the reusable workflow at homebridge/.github/.github/workflows/update-version.yml. That workflow constructs a malformed URL with double .github in the path:

https://raw.githubusercontent.com/homebridge/.github/latest/.github/.github/scripts/npm-version-script-esm-auto.js

The issue can be fixed in the homebridge/.github repository by either:

  1. Changing RAW_BASE_URL from "https://raw.githubusercontent.com/homebridge/.github/latest/.github" to "https://raw.githubusercontent.com/homebridge/.github/latest"
  2. Or changing VERSION_SCRIPT from ".github/scripts/npm-version-script-esm-auto.js" to "scripts/npm-version-script-esm-auto.js"

@Copilot Copilot AI changed the title Fix workflow failure by adding local npm version scripts Identify workflow failure caused by malformed URL in reusable workflow Sep 15, 2025
Copilot finished work on behalf of donavanbecker September 15, 2025 13:48
Copy link
Contributor Author

Copilot AI commented Sep 15, 2025

@copilot or if possible create an issue or pull request on the reusable workflow repo

I've identified the exact issue in the reusable workflow. The problem is in homebridge/.github/.github/workflows/update-version.yml at lines 33-34:

RAW_BASE_URL="https://raw.githubusercontent.com/homebridge/.github/latest/.github"
echo "Downloading $RAW_BASE_URL/$VERSION_SCRIPT"

Since VERSION_SCRIPT is set to .github/scripts/npm-version-script-esm-auto.js, this creates the malformed URL with double .github.

Fix needed: Change line 33 from:

RAW_BASE_URL="https://raw.githubusercontent.com/homebridge/.github/latest/.github"

to:

RAW_BASE_URL="https://raw.githubusercontent.com/homebridge/.github/latest"

I cannot directly create issues on the homebridge/.github repository, but you can create an issue there with this information. The fix is a simple one-line change that removes the extra .github from the base URL.

Copilot finished work on behalf of donavanbecker September 15, 2025 13:51
@donavanbecker donavanbecker marked this pull request as ready for review September 15, 2025 15:37
@donavanbecker donavanbecker deleted the copilot/fix-167 branch September 15, 2025 20:39
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.

Workflow Failure: Unified Release
2 participants