{"id":31938892,"url":"https://github.com/zarplata/concourse-git-bitbucket-pr-resource","last_synced_at":"2025-10-14T08:19:28.159Z","repository":{"id":21381682,"uuid":"92611640","full_name":"zarplata/concourse-git-bitbucket-pr-resource","owner":"zarplata","description":":rocket: Concourse CI resource for tracking git branches of Bitbucket pull-requests","archived":false,"fork":false,"pushed_at":"2023-05-12T06:47:47.000Z","size":81,"stargazers_count":34,"open_issues_count":3,"forks_count":43,"subscribers_count":9,"default_branch":"master","last_synced_at":"2025-04-12T00:23:51.463Z","etag":null,"topics":["bitbucket","concourse","concourse-ci","concourse-ci-resource","concourse-resource"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zarplata.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-05-27T16:48:47.000Z","updated_at":"2024-07-31T13:40:43.000Z","dependencies_parsed_at":"2023-01-11T21:11:30.871Z","dependency_job_id":null,"html_url":"https://github.com/zarplata/concourse-git-bitbucket-pr-resource","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"purl":"pkg:github/zarplata/concourse-git-bitbucket-pr-resource","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zarplata%2Fconcourse-git-bitbucket-pr-resource","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zarplata%2Fconcourse-git-bitbucket-pr-resource/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zarplata%2Fconcourse-git-bitbucket-pr-resource/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zarplata%2Fconcourse-git-bitbucket-pr-resource/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zarplata","download_url":"https://codeload.github.com/zarplata/concourse-git-bitbucket-pr-resource/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zarplata%2Fconcourse-git-bitbucket-pr-resource/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279018271,"owners_count":26086334,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-14T02:00:06.444Z","response_time":60,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bitbucket","concourse","concourse-ci","concourse-ci-resource","concourse-resource"],"created_at":"2025-10-14T08:19:20.554Z","updated_at":"2025-10-14T08:19:28.142Z","avatar_url":"https://github.com/zarplata.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# concourse-git-bitbucket-pr-resource\n\nTracks changes for all *git* branches for pull requests.\n\n**This resource is meant to be used with [`version:\nevery`](https://concourse.ci/get-step.html#get-version).**\n\nInspirited by [git-branch-heads-resourse](https://github.com/vito/git-branch-heads-resource)\n\n## Installation\n\nAdd the following `resource_types` entry to your pipeline:\n\n```yaml\n---\nresource_types:\n- name: git-bitbucket-pr\n  type: docker-image\n  source:\n    repository: zarplata/concourse-git-bitbucket-pr-resource\n```\n\n## Source Configuration\n\n* `base_url`: *Required*. base URL of the bitbucket server, without a trailing slash. \nFor example: `http://bitbucket.local`\n* `project`: *Required*. project for tracking\n* `repository`: *Required*. repository for tracking\n* `limit`: *Optional*. limit of tracked pull requests `default: 100`.\n* `git`: *Required*. configuration is based on the [Git\nresource](https://github.com/concourse/git-resource). The `branch` configuration\nfrom the original resource is ignored.\n* `bitbucket_type`: *Optional*. `cloud` for BitBucket Cloud or `server` for a self-hosted BitBucket Server. `default: server`\n* `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`.\n* `branch`: *Optional*. if given, only pull requests against this branch will be checked\n* `paths`: *Optional*. if specified (as a list of glob patterns), only changes to the specified files will yield new versions from check\n* `changes_limit`: *Optional*. the maximum number of changed `paths` loaded for each pull-request. `default: 100`. It works only with the `paths` parameter.\n* `direction`: *Optional*. the direction relative to the specified repository, either `incoming` (destination, e.g. to master) or `outgoing` (source, e.g. from feature).\nEither:\n* `username`: *Required*. username of the user which have access to repository.\n* `password`: *Required*. password of that user\nOr:\n* `oauth_id`: *Required*. Oauth id of an OAuth consumer configured as private and with permission to write to PRs.\n* `oauth_secret`: *Required*. Oauth secret of the same consumer.\n\n* `exclude_title`: *Optional*. prevent *check* from emitting new versions when only the pull request title changes, except when the string \"WIP\" is removed from the title.\n* `skip_ssl_verification`: *Optional*. Disable SSL verification on the Bitbucket API calls.\n* `ssl_cacert`: *Optional*. Custom CA certs to use to verify Bitbucket API calls.\n\n### Example\n\n``` yaml\nresources:\n- name: my-repo-with-pull-requests\n  type: git-bitbucket-pr\n  source:\n    base_url: http://bitbucket.local\n    username: some-username\n    password: some-password\n    project: zarplata\n    repository: concourse-git-bitbucket-pr-resource\n    git:\n      uri: https://github.com/zarplata/concourse-git-bitbucket-pr-resource\n      private_key: {{git-repo-key}}\n\njobs:\n  - name: my build\n    plan:    \n      - get: my-repo-with-pull-requests\n        trigger: true\n        version: every\n      - task: unit test\n          ...\n          inputs:          \n            - name: my-repo-with-pull-requests\n          run:\n          ...\n        on_failure:\n          put: my-repo-with-pull-requests\n          params:\n            action: change-build-status\n            state: FAILED\n            name: \"unit test\"\n            url: \"http://acme.com/teams/$BUILD_TEAM_NAME/pipelines/$BUILD_PIPELINE_NAME/jobs/$BUILD_JOB_NAME/builds/$BUILD_NAME\"\n        on_success:\n          put: my-repo-with-pull-requests\n          params:\n            action: change-build-status\n            state: SUCCESSFUL\n            name: \"unit test\"\n            url: \"http://acme.com/teams/$BUILD_TEAM_NAME/pipelines/$BUILD_PIPELINE_NAME/jobs/$BUILD_JOB_NAME/builds/$BUILD_NAME\"\n```\n\n## Behavior\n\n### `check`: Check for changes to all pull requests.\n\nThe current open pull requests fetched from Bitbucket server for given \nproject and repository. Update time are compared to the last fetched pull request.\n\nIf any pull request are new or updated or removed, a new version is emitted.\n\n### `in`: Fetch the commit that changed the pull request.\n\nThis resource delegates entirely to the `in` of the original Git resource, by\npassing through `source.git` to `source` of the original `git-resource`, then\nspecifying `source.branch` as the branch that changed, and `version.ref` as the\ncommit on the branch.\n\n#### Parameters\n\nAll `params`, except the ones listed below, will be passed through to `params` of the original `git-resource`.\n\n* `skip_download`: `Optional`. Skip `git pull`. Artifacts based on the git will not be present.\n* `fetch_upstream`: `Optional`. Also fetch the pull requests' upstream ref. This will overwrite the `fetch` param.\n\n### `out`: Update the PR.\n \nBehavior depends on the value of parameter `action`, where is the values are:\n\n* `change-build-status`: Change the commit build status.\n\n    * `action`: `Required`. For this behavior should be `change-build-status`.\n    * Parameters except the `name` will be respected the [Bitbucket documentation](https://developer.atlassian.com/server/bitbucket/how-tos/updating-build-status-for-commits/).\n    * `name`: `Deprecated`. Parameter is deprecated and has been left only for backward compatibility.\n    * `repository`: `Optional`. The path of the source repository for changing build status.\n\n* `push`: Push the commit to pull request branch.\n\n    * `action`: `Required`. For this behavior should be `push`.\n    * `repository`: `Optional`. The path of the source repository for pushing.\n\n## Troubleshooting\n\n* [Mark PR with \"build started\" creates a new version of a PR](https://github.com/zarplata/concourse-git-bitbucket-pr-resource/issues/15).\n\n    The Concourse is not available to skipping versions but have the workaround. \n    You should add the _resource with the same settings_ as `pull-request` for changing the build status only.\n\n    ```\n    - name: test-pull-requests\n      plan:\n      - get: pull-request\n        trigger: true\n        version: every\n      - get: node\n      - put: pull-request-status\n        params:\n          action: change-build-status\n          state: INPROGRESS\n          key: concourse-build\n          description: Building on Concourse\n    ```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzarplata%2Fconcourse-git-bitbucket-pr-resource","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzarplata%2Fconcourse-git-bitbucket-pr-resource","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzarplata%2Fconcourse-git-bitbucket-pr-resource/lists"}