{"action":"created","issue":{"url":"https://api.github.com/repos/cake-contrib/Cake.Incubator/issues/64","repository_url":"https://api.github.com/repos/cake-contrib/Cake.Incubator","labels_url":"https://api.github.com/repos/cake-contrib/Cake.Incubator/issues/64/labels{/name}","comments_url":"https://api.github.com/repos/cake-contrib/Cake.Incubator/issues/64/comments","events_url":"https://api.github.com/repos/cake-contrib/Cake.Incubator/issues/64/events","html_url":"https://github.com/cake-contrib/Cake.Incubator/issues/64","id":298767161,"number":64,"title":"`GetMatchingFiles()` includes original file path","user":{"login":"WalkerCodeRanger","id":186398,"avatar_url":"https://avatars2.githubusercontent.com/u/186398?v=4","gravatar_id":"","url":"https://api.github.com/users/WalkerCodeRanger","html_url":"https://github.com/WalkerCodeRanger","followers_url":"https://api.github.com/users/WalkerCodeRanger/followers","following_url":"https://api.github.com/users/WalkerCodeRanger/following{/other_user}","gists_url":"https://api.github.com/users/WalkerCodeRanger/gists{/gist_id}","starred_url":"https://api.github.com/users/WalkerCodeRanger/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/WalkerCodeRanger/subscriptions","organizations_url":"https://api.github.com/users/WalkerCodeRanger/orgs","repos_url":"https://api.github.com/users/WalkerCodeRanger/repos","events_url":"https://api.github.com/users/WalkerCodeRanger/events{/privacy}","received_events_url":"https://api.github.com/users/WalkerCodeRanger/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-02-20T22:07:53Z","updated_at":"2018-02-21T00:48:27Z","closed_at":null,"author_association":"NONE","body":"The [docs ](https://cakebuild.net/api/Cake.Incubator/GlobbingExtensions/6160F9D7) for `GetMatchingFiles()` say that it \"Returns files in the same directory that have the same file name but different extensions.\" It is also returning the original file.\r\n\r\nHere is the relevant section of the cake build script.\r\n\r\n```C#\r\nvar directoryPath = Directory.ToString();\r\nvar basePath = context.MakeAbsolute(Directory);\r\ncontext.Verbose(\"  in {0}\", directoryPath);\r\nvar configFiles = context.GetFiles(directoryPath+\"/**/App.config\", directoryPath+\"/**/Web.config\");\r\nforeach(var configFile in configFiles)\r\n{\r\n\tcontext.Verbose(\"  Found: {0}\", basePath.GetRelativePath(configFile));\r\n\tvar transformFiles = context.GetMatchingFiles(new [] { configFile }).Select(f => f.Path);\r\n\tforeach(var transformFile in transformFiles)\r\n\t{\r\n\t\tcontext.Verbose(\"    Checking: {0}\", basePath.GetRelativePath(transformFile));\r\n\t\t//context.XdtTransformConfig(configFile, transformFile, destinationFile);\r\n\t}\r\n}\r\n```\r\n\r\nThis outputs:\r\n\r\n```\r\n  in Services/Asset\r\n  Found: Services.Asset.ExternalService/App.config\r\n    Checking: Services.Asset.ExternalService/app.config\r\n  Found: Services.Asset.ServiceContracts/App.config\r\n    Checking: Services.Asset.ServiceContracts/App.config\r\n  Found: Services.Asset.Test/App.config\r\n    Checking: Services.Asset.Test/App.config\r\n  Found: Services.Asset.Application/Web.config\r\n    Checking: Services.Asset.Application/Web.config\r\n    Checking: Services.Asset.Application/Web.Debug.config\r\n    Checking: Services.Asset.Application/Web.Dev.config\r\n    Checking: Services.Asset.Application/Web.Prod.config\r\n    Checking: Services.Asset.Application/Web.QA.config\r\n    Checking: Services.Asset.Application/Web.Release.config\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/cake-contrib/Cake.Incubator/issues/comments/367174589","html_url":"https://github.com/cake-contrib/Cake.Incubator/issues/64#issuecomment-367174589","issue_url":"https://api.github.com/repos/cake-contrib/Cake.Incubator/issues/64","id":367174589,"user":{"login":"WalkerCodeRanger","id":186398,"avatar_url":"https://avatars2.githubusercontent.com/u/186398?v=4","gravatar_id":"","url":"https://api.github.com/users/WalkerCodeRanger","html_url":"https://github.com/WalkerCodeRanger","followers_url":"https://api.github.com/users/WalkerCodeRanger/followers","following_url":"https://api.github.com/users/WalkerCodeRanger/following{/other_user}","gists_url":"https://api.github.com/users/WalkerCodeRanger/gists{/gist_id}","starred_url":"https://api.github.com/users/WalkerCodeRanger/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/WalkerCodeRanger/subscriptions","organizations_url":"https://api.github.com/users/WalkerCodeRanger/orgs","repos_url":"https://api.github.com/users/WalkerCodeRanger/repos","events_url":"https://api.github.com/users/WalkerCodeRanger/events{/privacy}","received_events_url":"https://api.github.com/users/WalkerCodeRanger/received_events","type":"User","site_admin":false},"created_at":"2018-02-21T00:48:27Z","updated_at":"2018-02-21T00:48:27Z","author_association":"NONE","body":"Ok, make sure to update the example too.  It shows output that doesn't include the original file."}}
{"actor":{"display_login":"WalkerCodeRanger"}}