diff --git a/README.md b/README.md index 64cf02c..c516553 100644 --- a/README.md +++ b/README.md @@ -33,7 +33,7 @@ For example: `http://bitbucket.local` resource](https://github.com/concourse/git-resource). The `branch` configuration from the original resource is ignored. * `bitbucket_type`: *Optional*. `cloud` for BitBucket Cloud or `server` for a self-hosted BitBucket Server. `default: server` -* `dir`: *Optional*. set to name of the resource if resource name is different than repository name +* `dir`: *Deprecated*. set to name of the resource if resource name is different than repository name. Is deprecated in favor to `params.repository` in `out`. * `branch`: *Optional*. if given, only pull requests against this branch will be checked ### Example @@ -102,8 +102,9 @@ This updates the build status of the pull request commit. #### Parameters -Parameters except the `name` will be respected the [Bitbucket documentation](https://developer.atlassian.com/server/bitbucket/how-tos/updating-build-status-for-commits/). -The `name` parameter is deprecated and has been left only for backward compatibility. +* Parameters except the `name` will be respected the [Bitbucket documentation](https://developer.atlassian.com/server/bitbucket/how-tos/updating-build-status-for-commits/). +* `name`: `Deprecated`. Parameter is deprecated and has been left only for backward compatibility. +* `repository`: `Optional`. The path of the source repository for pushing or changing build status. ## Troubleshooting diff --git a/assets/out b/assets/out index 4f769f1..ae24f87 100755 --- a/assets/out +++ b/assets/out @@ -18,10 +18,10 @@ username=$(jq -r '.source.username // ""' < "${payload}") password=$(jq -r '.source.password // ""' < "${payload}") project=$(jq -r '.source.project // ""' < "${payload}") repository=$(jq -r '.source.repository // ""' < "${payload}") -dir=$(jq -r '.source.dir // ""' < "${payload}") +dir=$(jq -r '.params.repository // .source.dir // .source.repository // ""' < "${payload}") params=$(jq -rc '.params' < "${payload}") -cd "${dir:-$repository}" +cd "${dir}" pr=$(cat pull-request-info)