diff --git a/.changeset/honest-pianos-smell.md b/.changeset/honest-pianos-smell.md new file mode 100644 index 0000000000..56b87ce72d --- /dev/null +++ b/.changeset/honest-pianos-smell.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-jenkins': patch +--- + +Support showing build details for branches with slashes in their names diff --git a/plugins/jenkins/src/components/BuildWithStepsPage/BuildWithStepsPage.tsx b/plugins/jenkins/src/components/BuildWithStepsPage/BuildWithStepsPage.tsx index 1b7ccb8121..192f84458d 100644 --- a/plugins/jenkins/src/components/BuildWithStepsPage/BuildWithStepsPage.tsx +++ b/plugins/jenkins/src/components/BuildWithStepsPage/BuildWithStepsPage.tsx @@ -50,7 +50,9 @@ const BuildWithStepsView = () => { const projectName = useProjectSlugFromEntity(); const { branch, buildNumber } = useRouteRefParams(buildRouteRef); const classes = useStyles(); - const buildPath = `${projectName}/${branch}/${buildNumber}`; + const buildPath = `${projectName}/${encodeURIComponent( + branch, + )}/${buildNumber}`; const [{ value }] = useBuildWithSteps(buildPath); return ( diff --git a/plugins/jenkins/src/components/BuildsPage/lib/CITable/CITable.tsx b/plugins/jenkins/src/components/BuildsPage/lib/CITable/CITable.tsx index 57ffe48649..12d221d928 100644 --- a/plugins/jenkins/src/components/BuildsPage/lib/CITable/CITable.tsx +++ b/plugins/jenkins/src/components/BuildsPage/lib/CITable/CITable.tsx @@ -118,7 +118,7 @@ const generatedColumns: TableColumn[] = [