Skip to content
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

fix(bitbucket) : Modify PushHook parse #84

Closed
wants to merge 3 commits into from
Closed

fix(bitbucket) : Modify PushHook parse #84

wants to merge 3 commits into from

Conversation

Zifiv
Copy link

@Zifiv Zifiv commented Nov 18, 2020

  • Add "After" to matche the "change.fromHash" from the recent Bitbucket payload push event (fast fix for the skip-ci issue)

linked to : harness/harness#3038

* Add "After" to matche the "change.fromHash" from the recent Bitbucket payload push event (fast fix for the skip-ci issue)
@CLAassistant
Copy link

CLAassistant commented Nov 18, 2020

CLA assistant check
All committers have signed the CLA.

* Define the "FromHash" property from the push event of recent Bitbucket version
@Zifiv
Copy link
Author

Zifiv commented Nov 18, 2020

I've not realy tested it, but the goal is to add the "After" commit hash and with harness/harness#3038, the message could be filled.

@bradrydzewski
Copy link
Member

bradrydzewski commented Nov 18, 2020

the After field should store the SHA of the most recent commit on ref after the push. Is the FromHash the correct value to populate here? Also the sample payloads in our unit tests do not include a fromHash value. Where does this come from?

@bradrydzewski
Copy link
Member

I noticed you are trying to add toHash and fromHash fields. These fields do not exist in the Bitbucket Cloud implementation, but they do exist in the Bitbucket Server (Stash) implementation. Perhaps you mean to be looking at the code in this directory instead? https://github.com/drone/go-scm/tree/master/scm/driver/stash

Note that we recently (just a few days ago) merged a pull request that sets Before and After fields for Stash (Bitbucket Server). See #82.

@Zifiv
Copy link
Author

Zifiv commented Nov 18, 2020

the After field should store the SHA of the most recent commit on ref after the push. Is the FromHash the correct value to populate here? Also the sample payloads in our unit tests do not include a fromHash value. Where does this come from?

Yeah sorry, I've changed to use the "ToHash". I've actualy the last self-hosted Bitbucket server installed in my Kube, and I found this in the official doc : https://confluence.atlassian.com/bitbucketserver/event-payload-938025882.html

@bradrydzewski
Copy link
Member

not sure if you saw my previous comment, but the code in these files is for Bitbucket Cloud. The code for Bitbucket Server (Stash) can be found at github.com/drone/go-scm/scm/driver/stash. We also very recently merged pull request #82 which sets the Before and After values for Stash.

@Zifiv
Copy link
Author

Zifiv commented Nov 18, 2020

I noticed you are trying to add toHash and fromHash fields. These fields do not exist in the Bitbucket Cloud implementation, but they do exist in the Bitbucket Server (Stash) implementation. Perhaps you mean to be looking at the code in this directory instead? https://github.com/drone/go-scm/tree/master/scm/driver/stash

Note that we recently (just a few days ago) merged a pull request that sets Before and After fields for Stash (Bitbucket Server). See #82.

Yeah, sorry, I've not well look up for. Then you should see the pull request about change the order fo fill the message before do the skip trigger.

Is it in the 1.9.2 release of drone ?

@bradrydzewski
Copy link
Member

I will take a look at the other pull request ... let's move the discussion there. I am going to close this PR since Bitbucket Server has the Before and After fields populated. The 1.9.2 release does not have the latest version of the go-scm module, which means the dependency needs to be updated to take advantage of these features. Cheers.

jstrachan pushed a commit to jstrachan/go-scm that referenced this pull request Dec 22, 2020
fix: If we have no default page or other options, respond with all items.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants