{"action":"opened","issue":{"url":"https://api.github.com/repos/open-policy-agent/opa/issues/261","repository_url":"https://api.github.com/repos/open-policy-agent/opa","labels_url":"https://api.github.com/repos/open-policy-agent/opa/issues/261/labels{/name}","comments_url":"https://api.github.com/repos/open-policy-agent/opa/issues/261/comments","events_url":"https://api.github.com/repos/open-policy-agent/opa/issues/261/events","html_url":"https://github.com/open-policy-agent/opa/issues/261","id":207391777,"number":261,"title":"Rego package errors on queries containing negated single-term expressions","user":{"login":"tsandall","id":238885,"avatar_url":"https://avatars.githubusercontent.com/u/238885?v=3","gravatar_id":"","url":"https://api.github.com/users/tsandall","html_url":"https://github.com/tsandall","followers_url":"https://api.github.com/users/tsandall/followers","following_url":"https://api.github.com/users/tsandall/following{/other_user}","gists_url":"https://api.github.com/users/tsandall/gists{/gist_id}","starred_url":"https://api.github.com/users/tsandall/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tsandall/subscriptions","organizations_url":"https://api.github.com/users/tsandall/orgs","repos_url":"https://api.github.com/users/tsandall/repos","events_url":"https://api.github.com/users/tsandall/events{/privacy}","received_events_url":"https://api.github.com/users/tsandall/received_events","type":"User","site_admin":false},"labels":[{"id":304681999,"url":"https://api.github.com/repos/open-policy-agent/opa/labels/bug","name":"bug","color":"fc2929","default":true}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-02-14T01:35:42Z","updated_at":"2017-02-14T01:35:42Z","closed_at":null,"body":"Example:\r\n\r\n```\r\n\trego := rego.New(\r\n\t\trego.Query(`a = [\"ex\", \"am\", \"ple\"]; x = a[i]; not p[x]`),\r\n\t\trego.Package(`example`),\r\n\t\trego.Module(\"example.rego\", `package example\r\n\r\n\t\tp[\"am\"] { true }\r\n\t\t`),\r\n\t)\r\n```\r\n\r\nEval will return an unsafe variable error because the Rego query that's built will try to bind \"not p[x]\" to a generated var."}}
{"actor":{"display_login":"tsandall"}}