1
0
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:
Philippe Laflamme
2022-12-08 11:45:33 -05:00
committed by GitHub
parent 7a173c3827
commit 9963ea2aa8
4 changed files with 39 additions and 0 deletions

View File

@@ -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',