title: How to avoid double slash in Github repo URL?
body: <p>I'm trying to create AWS Codepipeline webhook with tag filter and plug it to existing repository webhook via terraform in accordance with <a href="https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/codepipeline_webhook" rel="nofollow noreferrer">Terraform docs</a></p>
  <p>Code which I've used:</p>
  <pre><code>resource &quot;aws_codepipeline_webhook&quot; &quot;pprod_webhook&quot; {
    name            = &quot;${var.client_code}-${var.environment}-pprod-hook&quot;
    authentication  = &quot;GITHUB_HMAC&quot;
    target_action   = &quot;Source&quot;
    target_pipeline = aws_codepipeline.cd.name
  
    authentication_configuration {
      secret_token = data.aws_ssm_parameter.github_token.value
    }
  
    filter {
      json_path    = &quot;$.ref_type&quot;
      match_equals = &quot;tag&quot;
    }
  }
  
  resource &quot;github_repository_webhook&quot; &quot;github_hook&quot; {
    repository = &quot;org_name/repo_name&quot;
  
    configuration {
      url          = aws_codepipeline_webhook.pprod_webhook.url
      content_type = &quot;json&quot;
      insecure_ssl = false
      secret       = data.aws_ssm_parameter.webhook_secret.value
    }
  
    active = true
    events = [&quot;create&quot;]
  }
  </code></pre>
  <p>EDIT <code>terraform plan</code>:</p>
  <pre><code>An execution plan has been generated and is shown below.
  Resource actions are indicated with the following symbols:
    + create
    ~ update in-place
  
  Terraform will perform the following actions:
  
   # module.codepipeline.github_repository_webhook.github_hook will be created
    + resource &quot;github_repository_webhook&quot; &quot;github_hook&quot; {
        + active     = true
        + etag       = (known after apply)
        + events     = [
            + &quot;create&quot;,
          ]
        + id         = (known after apply)
        + repository = &quot;org_name/repo_name&quot;
        + url        = (known after apply)
  
        + configuration {
            + content_type = &quot;json&quot;
            + insecure_ssl = false
            + secret       = (sensitive value)
            + url          = (sensitive value)
          }
      }
  </code></pre>
  <p>EDIT with <code>gh_url</code> output from terraform: I'm getting payload url which is in Github. Seems I do not have to create Github webhook, since one is in place already, but don't know if creating filter only will allow me trigger pipeline from tags only</p>
  <p>Unfortunately I'm getting error:</p>
  <blockquote>
  <p>Error: POST <a href="https://api.github.com/repos//org_name/repo_name/hooks" rel="nofollow noreferrer">https://api.github.com/repos//org_name/repo_name/hooks</a>:
  404 Not Found []</p>
  </blockquote>
  <p>No idea why I'm getting <code>//</code> in above URL. Is there any one who knows how to make that work?</p>