Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make host URL configurable #27

Merged
merged 4 commits into from
Oct 7, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
🎉 Add host parameter
  • Loading branch information
Schneegans committed Oct 7, 2023
commit 606d12105c685a6d38b8cb713549e7ed8cfdce9c
4 changes: 4 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ inputs:
message:
description: 'The right text of the badge'
required: true
host:
description: 'The base URL of the gist API'
default: 'https://api.github.com/gists/'
required: false
forceUpdate:
description: 'If set to true, the gist will be updated even if the content did not change'
default: 'false'
Expand Down
5 changes: 1 addition & 4 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,7 @@
import core from '@actions/core';
import { makeBadge } from 'badge-maker';

const gistUrl = new URL(
core.getInput('gistID'),
'https://api.github.com/gists/'
);
const gistUrl = new URL(core.getInput('gistID'), core.getInput('host'));

// This uses the method above to update a gist with the given data. The user agent is
// required as defined in https://developer.github.com/v3/#user-agent-required
Expand Down