Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions GitForWindowsHelper/component-updates.js
Original file line number Diff line number Diff line change
Expand Up @@ -143,15 +143,15 @@ const guessReleaseNotes = async (context, issue) => {
}
}

const pacmanRepositoryBaseURL = 'https://wingit.blob.core.windows.net/'
const pacmanRepositoryBaseURL = 'https://raw.githubusercontent.com/git-for-windows/pacman-repo/refs/heads/'

const pacmanRepositoryURLs = (package_name, version, architectures) =>
architectures.map(arch => {
const fileName = isMSYSPackage(package_name)
? `${package_name}-${version}-1-${arch}.pkg.tar.xz`
: `${package_name.replace(/^mingw-w64/,
`$&-${arch === 'aarch64' ? `clang-${arch}` : arch}`)}-${version}-1-any.pkg.tar.xz`
return `${pacmanRepositoryBaseURL}${arch.replace(/_/g, '-')}/${fileName}`
return `${pacmanRepositoryBaseURL}${arch}/${fileName}`
})

const getMissingDeployments = async (package_name, version) => {
Expand Down
14 changes: 7 additions & 7 deletions __tests__/component-updates.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,13 +83,13 @@ href="20230616162552.879387-1-corinna-cygwin@cygwin.com/">cygwin 3.4.7-1</a></b>

</pre>[... even more stuff...]</body></html>`
}
const missingURL = 'https://wingit.blob.core.windows.net/x86-64/curl-8.1.2-1-x86_64.pkg.tar.xz'
const missingAarch64URL = 'https://wingit.blob.core.windows.net/aarch64/mingw-w64-clang-aarch64-curl-8.1.2-1-any.pkg.tar.xz'
const missingMinTTYURL = 'https://wingit.blob.core.windows.net/i686/mintty-1~3.6.5-1-i686.pkg.tar.xz'
const bogus32BitMSYS2RuntimeURL = 'https://wingit.blob.core.windows.net/i686/msys2-runtime-3.4.9-1-i686.pkg.tar.xz'
const bogus64BitMSYS2RuntimeURL = 'https://wingit.blob.core.windows.net/x86-64/msys2-runtime-3.3-3.3.7-1-x86_64.pkg.tar.xz'
const missingOpenSSHURL = 'https://wingit.blob.core.windows.net/i686/openssh-9.5p1-1-i686.pkg.tar.xz'
const missingBashURL = 'https://wingit.blob.core.windows.net/x86-64/bash-5.2.020-1-x86_64.pkg.tar.xz'
const missingURL = 'https://raw.githubusercontent.com/git-for-windows/pacman-repo/refs/heads/x86_64/curl-8.1.2-1-x86_64.pkg.tar.xz'
const missingAarch64URL = 'https://raw.githubusercontent.com/git-for-windows/pacman-repo/refs/heads/aarch64/mingw-w64-clang-aarch64-curl-8.1.2-1-any.pkg.tar.xz'
const missingMinTTYURL = 'https://raw.githubusercontent.com/git-for-windows/pacman-repo/refs/heads/i686/mintty-1~3.6.5-1-i686.pkg.tar.xz'
const bogus32BitMSYS2RuntimeURL = 'https://raw.githubusercontent.com/git-for-windows/pacman-repo/refs/heads/i686/msys2-runtime-3.4.9-1-i686.pkg.tar.xz'
const bogus64BitMSYS2RuntimeURL = 'https://raw.githubusercontent.com/git-for-windows/pacman-repo/refs/heads/x86_64/msys2-runtime-3.3-3.3.7-1-x86_64.pkg.tar.xz'
const missingOpenSSHURL = 'https://raw.githubusercontent.com/git-for-windows/pacman-repo/refs/heads/i686/openssh-9.5p1-1-i686.pkg.tar.xz'
const missingBashURL = 'https://raw.githubusercontent.com/git-for-windows/pacman-repo/refs/heads/x86_64/bash-5.2.020-1-x86_64.pkg.tar.xz'
const mockDoesURLReturn404 = jest.fn(url => [
missingURL,
missingAarch64URL,
Expand Down
4 changes: 2 additions & 2 deletions __tests__/index.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -731,7 +731,7 @@ The workflow run [was started](dispatched-workflow-build-and-deploy.yml).`)
expect(dispatchedWorkflows.map(e => e.payload.inputs.architecture)).toEqual(['i686'])
})

const missingURL = 'https://wingit.blob.core.windows.net/x86-64/mingw-w64-x86_64-git-lfs-3.4.0-1-any.pkg.tar.xz'
const missingURL = 'https://raw.githubusercontent.com/git-for-windows/pacman-repo/refs/heads/x86_64/mingw-w64-x86_64-git-lfs-3.4.0-1-any.pkg.tar.xz'
const mockDoesURLReturn404 = jest.fn(url => url === missingURL)
jest.mock('../GitForWindowsHelper/https-request', () => {
return { doesURLReturn404: mockDoesURLReturn404 }
Expand Down Expand Up @@ -779,7 +779,7 @@ testIssueComment({ comment: '/add release note', note: 'missing deployment' }, {
expect(context.res).toEqual({
body: `The following deployment(s) are missing:

* https://wingit.blob.core.windows.net/x86-64/mingw-w64-x86_64-git-lfs-3.4.0-1-any.pkg.tar.xz`,
* https://raw.githubusercontent.com/git-for-windows/pacman-repo/refs/heads/x86_64/mingw-w64-x86_64-git-lfs-3.4.0-1-any.pkg.tar.xz`,
headers: undefined,
status: 500
})
Expand Down