-
Notifications
You must be signed in to change notification settings - Fork 131
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
Bitbucket: "Resource not found" retrieving Changesets from branch containing "/" #376
Comments
Can you please check if replacing the above-mentioned code block by $this->ensure_branch_valid( $f_master_branch ); fixes the problem ? |
@dregad Thanks for your answer. It helps to use branch with "/" as the Primary Branch or I used "*" as the Primary Branch and then I tried to retrieve changesets, it did not work. I got the same messages. |
I had a look at this today, apologies for the long delay. So there are 2 issues: Validation of branch selectionCan be fixed as mentioned in my earlier note (#376 (comment)). Note that it would actually be more appropriate to use $this->validate_branch_list( $f_master_branch ); Resource not found errorI confirm the issue, which occurs when importing changesets for a branch having The plugin makes the following Bitbucket API call : {
"type": "error",
"error": {
"message": "Resource not found",
"detail": "There is no API hosted at this URL.\n\nFor information about our API's, please refer to the documentation at: https://developer.atlassian.com/bitbucket/api/2/reference/"
}
} So AFAICT, this is actually caused by the Bitbucket API itself. I found this: https://jira.atlassian.com/browse/BCLOUD-9969 As a workaround, we could lookup the branch's target commit if the name contains a |
See if this PR helps you: jenkins-x/go-scm#295 |
@5dive thanks for the link |
The plugins is not able to retrieve changesets from branches contains "/" on their branch name from Bitbucket.
Examples:
Retrieving feature/ChangeRequests ... failed (Resource not found).
Retrieving feature/DescriptiveNames ... failed (Resource not found).
Retrieving feature/initial_commit ... failed (Resource not found).
Problem:
if( !preg_match( '/*|^[a-zA-Z0-9_., -]*$/', $f_master_branch ) ) {
echo 'Invalid parameter: 'Primary Branch'';
trigger_error( ERROR_GENERIC, ERROR );
}
From SourceBitBucket.php is not allow to have "/" in the branch name
The text was updated successfully, but these errors were encountered: