我想通过REST API在Bitbucket存储中的分支上提交提交

时间:2018-08-26 16:51:50

标签: git bitbucket bitbucket-server bitbucket-api

我正在尝试在bitbucket存储中的特定分支上提交提交。

  1. 分支最初是从master分支出来的,以开发一些功能
  2. 提交功能代​​码后,将其合并回主版本
  3. 但是分支未被删除,因此我想使用Bitbucket rest API来获取特定功能分支上的确切提交。

我尝试了

https://<stash-url>/stash/rest/api/1.0/projects/<project-ID>/repos/<repo-slig>/compare/commits?from=<my-target-feature-branch>&to=master

这给了我

{
"values": [],
"size": 0,
"isLastPage": true,
"start": 0,
"limit": 25,
"nextPageStart": null
}

我尝试的其他网址是

https://<stash-url>/stash/rest/api/latest/projects/<project-ID>/repos/<repo-slug>/commits?until=<my-target-feature-branch>&limit=100

这也给了我大师的整个提交历史。

有人可以帮我吗?我是新手,我确定对API文档的理解有误

1 个答案:

答案 0 :(得分:0)

尝试:

new Vue({
  el: '#app',

    data: {

        myvalue: '',
    focused : {
        mycheck: false
    },

     rules: {
        mycheck: [
          { required: true, message: 'Please input required', trigger: 'blur' },
          { min: 1, trigger: 'blur' }

        ],
    }
    }
})

另请参阅: https://community.atlassian.com/t5/Bitbucket-questions/Querying-the-last-commit-on-a-particular-branch-in-Bitbucket/qaq-p/577910