Skip to content

Commit 53ba3a8

Browse files
committed
/deploy: respect the i686: prefix of PR titles
To allow for building i686 packages that are no longer built by the MSYS2 project, let's establish the paradigm that Pull Requests whose titles start with `i686:` are to be deployed only to the 32-bit flavor of the Git for Windows Pacman repository. Note: Since it is not customary to specifically point out each and every such i686 build in the release notes, this commit does not take care of `getMissingDeployments()` nor of the `/add relnote` command. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
1 parent ec7b3fc commit 53ba3a8

2 files changed

Lines changed: 26 additions & 1 deletion

File tree

GitForWindowsHelper/slash-commands.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ module.exports = async (context, req) => {
188188

189189
const toTrigger = []
190190
if (isMSYSPackage(package_name)) {
191-
if (package_name !== 'msys2-runtime-3.3') {
191+
if (package_name !== 'msys2-runtime-3.3' && !req.body.issue.title.startsWith('i686:')) {
192192
toTrigger.push(
193193
{ architecture: 'x86_64' }
194194
)

__tests__/index.test.js

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,9 @@ let mockGitHubApiRequest = jest.fn((_context, _token, method, requestPath, paylo
118118
if (method === 'GET' && requestPath.endsWith('/pulls/96')) return {
119119
head: { sha: 'b7b0dfc' }
120120
}
121+
if (method === 'GET' && requestPath.endsWith('/pulls/153')) return {
122+
head: { sha: 'b197f8f' }
123+
}
121124
if (method === 'GET' && requestPath.endsWith('/pulls/4322')) return {
122125
head: { sha: 'c8edb521bdabec14b07e9142e48cab77a40ba339' }
123126
}
@@ -525,6 +528,28 @@ The workflow run [was started](dispatched-workflow-build-and-deploy.yml).`)
525528
expect(dispatchedWorkflows.map(e => e.payload.inputs.architecture)).toEqual(['aarch64'])
526529
})
527530

531+
testIssueComment('/deploy libkbsa', {
532+
issue: {
533+
number: 153,
534+
title: 'i686: build newest version of libksba, because gnupg requires at least v1.6.3',
535+
body: 'I just tried to deploy gnupg v2.4.4 but it failed in the deploy-i686 job because of an outdated libksba package. We used to benefit from MSYS2\'s updates, but for the i686 variant there are no more updates of the MSYS packages, therefore we have to build it ourselves now.',
536+
pull_request: {
537+
html_url: 'https://github.com/git-for-windows/MSYS2-packages/pull/153'
538+
}
539+
},
540+
repository: {
541+
name: 'MSYS2-packages'
542+
}
543+
}, async (context) => {
544+
expect(await index(context, context.req)).toBeUndefined()
545+
expect(context.res.body).toEqual(`I edited the comment: appended-comment-body-existing comment body
546+
547+
The workflow run [was started](dispatched-workflow-build-and-deploy.yml).`)
548+
expect(mockQueueCheckRun).toHaveBeenCalledTimes(1)
549+
expect(mockUpdateCheckRun).toHaveBeenCalledTimes(1)
550+
expect(dispatchedWorkflows.map(e => e.payload.inputs.architecture)).toEqual(['i686'])
551+
})
552+
528553
const missingURL = 'https://wingit.blob.core.windows.net/x86-64/mingw-w64-x86_64-git-lfs-3.4.0-1-any.pkg.tar.xz'
529554
const mockDoesURLReturn404 = jest.fn(url => url === missingURL)
530555
jest.mock('../GitForWindowsHelper/https-request', () => {

0 commit comments

Comments
 (0)