Skip to content

feat: add option strip_prefix #237

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
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
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -104,6 +104,7 @@ Adding the following to your workflow will create a new Sentry release and tell
|`set_commits`| Specify whether to set commits for the release. Either "auto" or "skip". |"auto"|
|`projects`| Space-separated list of paths of projects. When omitted, falls back to the environment variable `SENTRY_PROJECT` to determine the project. |-|
|`url_prefix`| Adds a prefix to source map urls after stripping them. |-|
|`strip_prefix`|Will chop-off a prefix from all sources references inside uploaded source maps. For instance, you can use this to remove a path that is build machine specific.|-|
|`strip_common_prefix`| Will remove a common prefix from uploaded filenames. Useful for removing a path that is build-machine-specific. |`false`|
|`working_directory`| Directory to collect sentry release information from. Useful when collecting information from a non-standard checkout directory. |-|
|`disable_telemetry`| The action sends telemetry data and crash reports to Sentry. This helps us improve the action. You can turn this off by setting this flag. |`false`|
3 changes: 3 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
@@ -44,6 +44,9 @@ inputs:
strip_common_prefix:
description: 'Will remove a common prefix from uploaded filenames. Useful for removing a path that is build-machine-specific.'
required: false
strip_prefix:
description: 'Will chop-off a prefix from all sources references inside uploaded source maps. For instance, you can use this to remove a path that is build machine specific.'
required: false
working_directory:
description: 'Directory to collect sentry release information from. Useful when collecting information from a non-standard checkout directory.'
required: false
2 changes: 2 additions & 0 deletions src/main.ts
Original file line number Diff line number Diff line change
@@ -30,6 +30,7 @@ withTelemetry(
const setCommitsOption = options.getSetCommitsOption();
const projects = options.getProjects();
const urlPrefix = options.getUrlPrefixOption();
const stripPrefix = options.getStripPrefixOption();
const stripCommonPrefix = options.getBooleanOption(
'strip_common_prefix',
false
@@ -90,6 +91,7 @@ withTelemetry(
projects: localProjects,
dist,
urlPrefix,
stripPrefix,
stripCommonPrefix,
};
return getCLI().uploadSourceMaps(version, sourceMapOptions);
4 changes: 4 additions & 0 deletions src/options.ts
Original file line number Diff line number Diff line change
@@ -195,3 +195,7 @@ export const getUrlPrefixOption = (): string => {
export const getWorkingDirectory = (): string => {
return core.getInput('working_directory');
};

export const getStripPrefixOption = (): string => {
return core.getInput('strip_prefix');
};