mirror of
https://github.com/joaquinjsb/gitea-release-please-action
synced 2026-05-09 20:11:16 +02:00
feat: add pull-request-header input (#615)
Co-authored-by: Jeff Ching <chingor@google.com>
This commit is contained in:
committed by
GitHub
parent
7a173c3827
commit
9963ea2aa8
@@ -159,6 +159,39 @@ describe('release-please-action', () => {
|
||||
)
|
||||
})
|
||||
|
||||
it('opens PR with custom header', async () => {
|
||||
input = {
|
||||
command: 'release-pr',
|
||||
'release-type': 'node',
|
||||
'pull-request-header': 'another header',
|
||||
'skip-github-release': 'false',
|
||||
prerelease: 'false',
|
||||
'include-v-in-tag': 'true',
|
||||
'always-link-local': 'true',
|
||||
'separate-pull-requests': 'false',
|
||||
'skip-labeling': 'false',
|
||||
'sequential-calls': 'false'
|
||||
}
|
||||
|
||||
const createPullRequestsFake = sandbox.fake.returns([fixturePrs[0]])
|
||||
const createManifestCommand = sandbox.stub(Manifest, 'fromConfig').returns({
|
||||
createPullRequests: createPullRequestsFake
|
||||
})
|
||||
await action.main()
|
||||
|
||||
sinon.assert.calledOnce(createPullRequestsFake)
|
||||
sinon.assert.calledWith(
|
||||
createManifestCommand,
|
||||
sinon.match.any,
|
||||
'main',
|
||||
sinon.match.hasOwn(
|
||||
'pullRequestHeader',
|
||||
'another header'
|
||||
),
|
||||
sinon.match.any
|
||||
)
|
||||
})
|
||||
|
||||
it('both opens PR to the default branch and tags GitHub releases by default', async () => {
|
||||
input = {
|
||||
'skip-github-release': 'false',
|
||||
|
||||
Reference in New Issue
Block a user