1
0
mirror of https://github.com/joaquinjsb/gitea-release-please-action synced 2026-05-13 11:51:37 +02:00

feat(manifest): add manifest-pr command (#280)

This commit is contained in:
Benjamin E. Coe
2021-03-24 22:48:32 -07:00
committed by GitHub
parent 10ca9ee886
commit f48a175f37
3 changed files with 20 additions and 5 deletions

View File

@@ -3,7 +3,7 @@ const { factory } = require('release-please/build/src')
const CONFIG_FILE = 'release-please-config.json'
const MANIFEST_FILE = '.release-please-manifest.json'
const MANIFEST_COMMAND = 'manifest'
const MANIFEST_COMMANDS = ['manifest', 'manifest-pr']
const RELEASE_LABEL = 'autorelease: pending'
const GITHUB_RELEASE_COMMAND = 'github-release'
const GITHUB_RELEASE_PR_COMMAND = 'release-pr'
@@ -34,13 +34,14 @@ function getManifestInput () {
}
}
async function runManifest () {
async function runManifest (command) {
const githubOpts = getGitHubInput()
const manifestOpts = { ...githubOpts, ...getManifestInput() }
const pr = await factory.runCommand('manifest-pr', manifestOpts)
if (pr) {
core.setOutput('pr', pr)
}
if (command === 'manifest-pr') return
const releasesCreated = await factory.runCommand('manifest-release', manifestOpts)
if (releasesCreated) {
@@ -58,8 +59,8 @@ async function runManifest () {
async function main () {
const command = core.getInput('command') || undefined
if (command === MANIFEST_COMMAND) {
return await runManifest()
if (MANIFEST_COMMANDS.includes(command)) {
return await runManifest(command)
}
const { token, fork, defaultBranch, apiUrl, repoUrl } = getGitHubInput()