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

Add a parameter to update webhooks for a single repo in an org #2336

Merged
merged 7 commits into from Nov 28, 2018

Conversation

Projects
None yet
5 participants
@Vlatombe
Copy link
Contributor

Vlatombe commented Nov 27, 2018

jx update webhook -o jenkins-x -r jx

Submitter checklist

  • Change is code complete and matches issue description.
  • Change is covered by existing or new tests.

Description

This improves the update webhook entry point to optionally target a single repository.

Special notes for the reviewer(s)

The use case is to update webhooks in a jx-enabled repo in an organization where jenkins-x is only used on a restricted set of repositories, so I didn't want a full sweep.

Which issue this PR fixes

Add a parameter to update webhooks for a single repo in an org
jx update webhook -o jenkins-x -r jx
for _, webHook := range webhooks {
if options.matches(webhookUrl, webHook) {
log.Infof("Found matching hook for url %s\n", util.ColorInfo(webHook.URL))
func (options *UpdateWebhooksOptions) updateRepoHook(git gits.GitProvider, repoName string, webhookUrl string, isProwEnabled bool, hmacToken *corev1.Secret) error {

This comment has been minimized.

@houndci-bot

houndci-bot Nov 27, 2018

Collaborator

method parameter webhookUrl should be webhookURL

Vlatombe added some commits Nov 27, 2018

@ccojocar

This comment has been minimized.

Copy link
Member

ccojocar commented Nov 27, 2018

/test bdd
/lgtm
/approve

@jenkins-x-bot jenkins-x-bot removed the lgtm label Nov 27, 2018

@ccojocar

This comment has been minimized.

Copy link
Member

ccojocar commented Nov 27, 2018

/retest

@ccojocar

This comment has been minimized.

Copy link
Member

ccojocar commented Nov 27, 2018

/retest

@ccojocar

This comment has been minimized.

Copy link
Member

ccojocar commented Nov 27, 2018

/lgtm

@jenkins-x-bot jenkins-x-bot added the lgtm label Nov 27, 2018

@jenkins-x-bot jenkins-x-bot removed the lgtm label Nov 28, 2018

@ccojocar

This comment has been minimized.

Copy link
Member

ccojocar commented Nov 28, 2018

/retest

@jstrachan

This comment has been minimized.

Copy link
Member

jstrachan commented Nov 28, 2018

/lgtm

@jenkins-x-bot

This comment has been minimized.

Copy link
Contributor

jenkins-x-bot commented Nov 28, 2018

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: ccojocar, jstrachan

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@jenkins-x-bot jenkins-x-bot merged commit ff9168a into jenkins-x:master Nov 28, 2018

3 checks passed

Hound No violations found. Woof!
serverless-jenkins succeeded
tide In merge pool.
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment