Skip to content

JENKINS-47867 Add WebhookConfigurationTrait #194

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

Merged

Conversation

redfive
Copy link
Contributor

@redfive redfive commented May 28, 2019

  • Adds a trait to allow setting of the committersToIgnore value
  • Adds unit tests for setting of the value
  • Adds a property accessor to the WebhookConfiguration for testing
  • Adds resource definitions to allow setting in the UI

Your checklist for this pull request

  • Make sure you are requesting to pull a topic/feature/bugfix branch (right side) and not your master branch!

  • [x ] Please describe what you did

  • [x ] Link to relevant GitHub issues or pull requests

  • Link to relevant Jenkins JIRA issues

  • [x ] Did you provide a test-case? That demonstrates feature works or fixes the issue.

Description

Add a WebhookConfigurationTrait to allow setting of the committersToIgnore value of the WebhookConfiguration class. This makes it possible to set and persist the value of field for the Bitbucket Webhook. Without this exposure there is no way to set and maintain the setting on the Webhook as the current implementation does not set it, and always overwrites what is set on the server (since it's always different).

Addresses this Jira issue:
https://issues.jenkins-ci.org/browse/JENKINS-47867

Previous PR that added some of the required plumbing:
#77

John Gaunt added 2 commits May 28, 2019 14:05
- Adds a trait to allow setting of the committersToIgnore value
- Adds unit tests for setting of the value
- Adds a property accessor to the WebhookConfiguration for testing
- Adds resource definitions to allow setting in the UI
- rename tests without underscores
- remove unused import
@jetersen
Copy link
Member

👀

@jetersen jetersen self-requested a review May 29, 2019 00:21
Copy link
Member

@jetersen jetersen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since this is a core functionality of the webhook for bitbucket webhook plugin. To me, it makes sense to keep the trait in this plugin.
WDYT @amuniz @rsandell @stephenc

@redfive
Copy link
Contributor Author

redfive commented Jun 3, 2019

looks like the window node was offline in that last test run, or generally had trouble with the connection. Is there a way to re-trigger the test run without a code push?

@jetersen
Copy link
Member

jetersen commented Jun 3, 2019

what I usually do is just an empty commit:

[alias]
  rerun-ci = !git commit -m \"Rerun CI\" --allow-empty && git push

John Gaunt added 2 commits June 3, 2019 15:21
@stephenc
Copy link
Member

stephenc commented Jun 3, 2019

@Casz much easier is to close the PR, wait 30 seconds, open it again. Boom rebuild without extra commits

@redfive
Copy link
Contributor Author

redfive commented Jun 4, 2019

Ah, like the trick with the close/re-open triggering the rebuild.

Happy to rebase to compact the extra commits; it doesn't look like you squash on merge.

@jetersen
Copy link
Member

jetersen commented Jun 4, 2019

No need @redfive I usually use squashing as it keeps the branch graph clean.

@redfive
Copy link
Contributor Author

redfive commented Jun 7, 2019

What's left in the process for this one? Would love to get this landed so I can roll out an official plugin.

@jetersen jetersen requested review from stephenc, rsandell and amuniz June 7, 2019 17:27
@redfive
Copy link
Contributor Author

redfive commented Jun 13, 2019

Bump to keep this on radar. Any chance of a review this week? Thanks!

@stephenc
Copy link
Member

Personally I think it would be better if this functionality could live in the plugin that is the bitbucket webhook receiver... however as I suspect that would result in a circular dependency, it is probably OK-ish to add it here.

@stephenc stephenc removed their request for review June 17, 2019 09:33
@redfive
Copy link
Contributor Author

redfive commented Jun 19, 2019

@stephenc which plugin is that? I see all the webhook registration and listener code in this plugin. And I don't see another plugin that is obviously the BB Webhook Receiver.

@redfive
Copy link
Contributor Author

redfive commented Jun 24, 2019

What can I do to help push this through? It's been up for review for almost a month. :-(

@jetersen jetersen merged commit a281d68 into jenkinsci:master Jun 24, 2019
@redfive
Copy link
Contributor Author

redfive commented Jun 24, 2019

Thanks @Casz !!!

@redfive redfive deleted the JENKINS-47867_webhook_configuration_trait branch June 24, 2019 21:47
@jetersen
Copy link
Member

@redfive your welcome 😊

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants