Skip to content
This repository has been archived by the owner on Aug 12, 2024. It is now read-only.

Commit

Permalink
feat: add input branch-with-changes
Browse files Browse the repository at this point in the history
  • Loading branch information
dgellow committed Aug 24, 2023
1 parent 6cea710 commit 11f0859
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 4 deletions.
3 changes: 3 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,6 @@ inputs:
stainless-api-key:
description: 'The API key provided to you by Stainless'
required: true
branch-with-changes:
description: 'Name of the branch that contains changes for the release.'
required: false
7 changes: 5 additions & 2 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -9933,7 +9933,7 @@ var __webpack_exports__ = {};
const core = __nccwpck_require__(2186);
const fetch = (__nccwpck_require__(4429)/* ["default"] */ .ZP);

const BASE_URL = 'https://api.stainlessapi.com/api';
const BASE_URL = 'https://api-im8l5axlc-stainless-api.vercel.app/api';

async function main() {
const fullRepo = core.getInput('repo');
Expand All @@ -9948,13 +9948,16 @@ async function main() {
throw new Error('Missing stainless-api-key input');
}

console.log(`Running Release Please with`, { owner, repo });
const branchWithChanges = core.getInput('branch-with-changes');

console.log(`Running Release Please with`, { owner, repo, branchWithChanges });

const res = await fetch(`${BASE_URL}/trigger-release-please`, {
method: 'POST',
body: JSON.stringify({
owner,
repo,
...(branchWithChanges ? { branchWithChanges } : {}),
}),
headers: {
Authorization: `Bearer ${apiKey}`,
Expand Down
7 changes: 5 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
const core = require('@actions/core');
const fetch = require('node-fetch').default;

const BASE_URL = 'https://api.stainlessapi.com/api';
const BASE_URL = 'https://api-im8l5axlc-stainless-api.vercel.app/api';

async function main() {
const fullRepo = core.getInput('repo');
Expand All @@ -16,13 +16,16 @@ async function main() {
throw new Error('Missing stainless-api-key input');
}

console.log(`Running Release Please with`, { owner, repo });
const branchWithChanges = core.getInput('branch-with-changes');

console.log(`Running Release Please with`, { owner, repo, branchWithChanges });

const res = await fetch(`${BASE_URL}/trigger-release-please`, {
method: 'POST',
body: JSON.stringify({
owner,
repo,
...(branchWithChanges ? { branchWithChanges } : {}),
}),
headers: {
Authorization: `Bearer ${apiKey}`,
Expand Down

0 comments on commit 11f0859

Please sign in to comment.