mirror of
https://github.com/andwati/dokploy.git
synced 2026-11-18 18:05:18 +00:00
Merge pull request #2899 from Dokploy/2793-watch-paths-dont-work-with-bitbucket-workspace-specified
fix(api): update Bitbucket API URL construction to use a unified user…
This commit is contained in:
@@ -368,14 +368,14 @@ export const extractCommitedPaths = async (
|
|||||||
.map((change: any) => change.new?.target?.hash)
|
.map((change: any) => change.new?.target?.hash)
|
||||||
.filter(Boolean);
|
.filter(Boolean);
|
||||||
const commitedPaths: string[] = [];
|
const commitedPaths: string[] = [];
|
||||||
|
const username =
|
||||||
|
bitbucket?.bitbucketWorkspaceName || bitbucket?.bitbucketUsername || "";
|
||||||
for (const commit of commitHashes) {
|
for (const commit of commitHashes) {
|
||||||
const url = `https://api.bitbucket.org/2.0/repositories/${bitbucket?.bitbucketUsername}/${repository}/diffstat/${commit}`;
|
const url = `https://api.bitbucket.org/2.0/repositories/${username}/${repository}/diffstat/${commit}`;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const response = await fetch(url, {
|
const response = await fetch(url, {
|
||||||
headers: getBitbucketHeaders(bitbucket!),
|
headers: getBitbucketHeaders(bitbucket!),
|
||||||
});
|
});
|
||||||
|
|
||||||
const data = await response.json();
|
const data = await response.json();
|
||||||
for (const value of data.values) {
|
for (const value of data.values) {
|
||||||
if (value?.new?.path) commitedPaths.push(value.new.path);
|
if (value?.new?.path) commitedPaths.push(value.new.path);
|
||||||
|
|||||||
Reference in New Issue
Block a user