{"action":"created","issue":{"url":"https://api.github.com/repos/PebbleTemplates/pebble/issues/371","repository_url":"https://api.github.com/repos/PebbleTemplates/pebble","labels_url":"https://api.github.com/repos/PebbleTemplates/pebble/issues/371/labels{/name}","comments_url":"https://api.github.com/repos/PebbleTemplates/pebble/issues/371/comments","events_url":"https://api.github.com/repos/PebbleTemplates/pebble/issues/371/events","html_url":"https://github.com/PebbleTemplates/pebble/issues/371","id":341500628,"node_id":"MDU6SXNzdWUzNDE1MDA2Mjg=","number":371,"title":"Defining local scope variables in macros","user":{"login":"okohub","id":4178365,"node_id":"MDQ6VXNlcjQxNzgzNjU=","avatar_url":"https://avatars3.githubusercontent.com/u/4178365?v=4","gravatar_id":"","url":"https://api.github.com/users/okohub","html_url":"https://github.com/okohub","followers_url":"https://api.github.com/users/okohub/followers","following_url":"https://api.github.com/users/okohub/following{/other_user}","gists_url":"https://api.github.com/users/okohub/gists{/gist_id}","starred_url":"https://api.github.com/users/okohub/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/okohub/subscriptions","organizations_url":"https://api.github.com/users/okohub/orgs","repos_url":"https://api.github.com/users/okohub/repos","events_url":"https://api.github.com/users/okohub/events{/privacy}","received_events_url":"https://api.github.com/users/okohub/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/PebbleTemplates/pebble/milestones/9","html_url":"https://github.com/PebbleTemplates/pebble/milestone/9","labels_url":"https://api.github.com/repos/PebbleTemplates/pebble/milestones/9/labels","id":3495060,"node_id":"MDk6TWlsZXN0b25lMzQ5NTA2MA==","number":9,"title":"3.0.1","description":"","creator":{"login":"ebussieres","id":10672519,"node_id":"MDQ6VXNlcjEwNjcyNTE5","avatar_url":"https://avatars3.githubusercontent.com/u/10672519?v=4","gravatar_id":"","url":"https://api.github.com/users/ebussieres","html_url":"https://github.com/ebussieres","followers_url":"https://api.github.com/users/ebussieres/followers","following_url":"https://api.github.com/users/ebussieres/following{/other_user}","gists_url":"https://api.github.com/users/ebussieres/gists{/gist_id}","starred_url":"https://api.github.com/users/ebussieres/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ebussieres/subscriptions","organizations_url":"https://api.github.com/users/ebussieres/orgs","repos_url":"https://api.github.com/users/ebussieres/repos","events_url":"https://api.github.com/users/ebussieres/events{/privacy}","received_events_url":"https://api.github.com/users/ebussieres/received_events","type":"User","site_admin":false},"open_issues":1,"closed_issues":1,"state":"open","created_at":"2018-07-13T19:09:22Z","updated_at":"2018-07-26T17:10:06Z","due_on":null,"closed_at":null},"comments":11,"created_at":"2018-07-16T12:34:43Z","updated_at":"2018-07-26T17:10:06Z","closed_at":"2018-07-26T17:10:06Z","author_association":"NONE","body":"Hello,\r\n\r\nWhen dealing with macros, sometimes we need to hold a value in variable to use it more than once.\r\n\r\nFor example;\r\n\r\n```\r\n{% macro toggleMacro(itemInfo) %}\r\n{% set productId = itemInfo.item.productId %}\r\n<input type=\"radio\"\r\n       class=\"select-radio hide\"\r\n       checked=\"true\"\r\n       value=\"{{ currentUnit }}\"\r\n       name=\"{{ 'unit_' + productId }}\"/>\r\n{% endmacro %}\r\n```\r\n\r\nbut setting a new productId variable, will also override current productId variable if exists in context. I know it can be useful to reach all context, but I think we need to also support local variables.\r\n\r\nMay be {% set local foo = bar %} for example?"},"comment":{"url":"https://api.github.com/repos/PebbleTemplates/pebble/issues/comments/408167872","html_url":"https://github.com/PebbleTemplates/pebble/issues/371#issuecomment-408167872","issue_url":"https://api.github.com/repos/PebbleTemplates/pebble/issues/371","id":408167872,"node_id":"MDEyOklzc3VlQ29tbWVudDQwODE2Nzg3Mg==","user":{"login":"ebussieres","id":10672519,"node_id":"MDQ6VXNlcjEwNjcyNTE5","avatar_url":"https://avatars3.githubusercontent.com/u/10672519?v=4","gravatar_id":"","url":"https://api.github.com/users/ebussieres","html_url":"https://github.com/ebussieres","followers_url":"https://api.github.com/users/ebussieres/followers","following_url":"https://api.github.com/users/ebussieres/following{/other_user}","gists_url":"https://api.github.com/users/ebussieres/gists{/gist_id}","starred_url":"https://api.github.com/users/ebussieres/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ebussieres/subscriptions","organizations_url":"https://api.github.com/users/ebussieres/orgs","repos_url":"https://api.github.com/users/ebussieres/repos","events_url":"https://api.github.com/users/ebussieres/events{/privacy}","received_events_url":"https://api.github.com/users/ebussieres/received_events","type":"User","site_admin":false},"created_at":"2018-07-26T17:10:06Z","updated_at":"2018-07-26T17:10:06Z","author_association":"MEMBER","body":"Resolved via #375 "}}
{"actor":{"display_login":"ebussieres"}}