Skip to content

Fix env var len check in gh feedlet#377

Merged
knative-prow-robot merged 1 commit into
knative:masterfrom
greghaynes:fix/github-feedlet-namespace-len-check
Aug 20, 2018
Merged

Fix env var len check in gh feedlet#377
knative-prow-robot merged 1 commit into
knative:masterfrom
greghaynes:fix/github-feedlet-namespace-len-check

Conversation

@greghaynes
Copy link
Copy Markdown
Contributor

Proposed Changes

The logic is inverted when we are checking for existence of
FEED_NAMESPACE and other env vars in the gihub source feedlet - we are
asserting len != 0 rather than len == 0.

Release Note

The logic is inverted when we are checking for existence of
FEED_NAMESPACE and other env vars in the gihub source feedlet - we are
asserting len != 0 rather than len == 0.
@knative-prow-robot knative-prow-robot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Aug 16, 2018
@greghaynes
Copy link
Copy Markdown
Contributor Author

/test pull-knative-eventing-integration-tests

@n3wscott
Copy link
Copy Markdown
Contributor

/lgtm

Thanks!

@knative-prow-robot knative-prow-robot added the lgtm Indicates that a PR is ready to be merged. label Aug 17, 2018
@n3wscott
Copy link
Copy Markdown
Contributor

/assign @evankanderson

Copy link
Copy Markdown
Member

@evankanderson evankanderson left a comment

Choose a reason for hiding this comment

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

/lgtm
/approve


feedNamespace := os.Getenv(sources.FeedNamespaceKey)
if len(feedNamespace) != 0 {
if len(feedNamespace) == 0 {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I have a slight preference for comparing with empty string here, as it seems less likely to produce these sorts of errors.

@knative-prow-robot
Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: evankanderson, greghaynes

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

The pull request process is described here

Details 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

@knative-prow-robot knative-prow-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Aug 20, 2018
@evankanderson evankanderson mentioned this pull request Aug 20, 2018
@knative-prow-robot knative-prow-robot merged commit 6e3f5d2 into knative:master Aug 20, 2018
matzew added a commit to matzew/eventing that referenced this pull request Jan 8, 2020
matzew added a commit to matzew/eventing that referenced this pull request Oct 24, 2023
knative#377)

Signed-off-by: Matthias Wessendorf <mwessend@redhat.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants