René's URL Explorer Experiment


Title: Repository.writeFile fails if no options object is passed · Issue #577 · github-tools/github · GitHub

Open Graph Title: Repository.writeFile fails if no options object is passed · Issue #577 · github-tools/github

X Title: Repository.writeFile fails if no options object is passed · Issue #577 · github-tools/github

Description: In the documentation about Repository.writeFile, the options parameter is specified as optional. Despite this, the function fails if no options object is passed and throws this error: TypeError: Cannot read property 'encode' of undefined...

Open Graph Description: In the documentation about Repository.writeFile, the options parameter is specified as optional. Despite this, the function fails if no options object is passed and throws this error: TypeError: Ca...

X Description: In the documentation about Repository.writeFile, the options parameter is specified as optional. Despite this, the function fails if no options object is passed and throws this error: TypeError: Ca...

Opengraph URL: https://github.com/github-tools/github/issues/577

X: @github

direct link

Domain: patch-diff.githubusercontent.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Repository.writeFile fails if no options object is passed","articleBody":"In the [documentation](http://github-tools.github.io/github/docs/3.1.0/Repository.html#writeFile) about `Repository.writeFile`, the `options` parameter is specified as optional. Despite this, the function fails if no `options` object is passed and throws this error:\r\n```\r\nTypeError: Cannot read property 'encode' of undefined\r\n    at Repository.writeFile (/Users/lucasantchougov/Documents/Work/oauth-rule-manager/node_modules/github-api/dist/components/Repository.js:941:37)\r\n    at GitHubRuleManager.commitWorkspace (/Users/lucasantchougov/Documents/Work/oauth-rule-manager/lib/rule_managers/github-rule-manager.js:143:18)\r\n    at /Users/lucasantchougov/Documents/Work/matey/matey-server/app.js:74:25\r\n    at Layer.handle [as handle_request] (/Users/lucasantchougov/Documents/Work/matey/matey-server/node_modules/express/lib/router/layer.js:95:5)\r\n    at next (/Users/lucasantchougov/Documents/Work/matey/matey-server/node_modules/express/lib/router/route.js:137:13)\r\n    at Route.dispatch (/Users/lucasantchougov/Documents/Work/matey/matey-server/node_modules/express/lib/router/route.js:112:3)\r\n    at Layer.handle [as handle_request] (/Users/lucasantchougov/Documents/Work/matey/matey-server/node_modules/express/lib/router/layer.js:95:5)\r\n    at /Users/lucasantchougov/Documents/Work/matey/matey-server/node_modules/express/lib/router/index.js:281:22\r\n    at param (/Users/lucasantchougov/Documents/Work/matey/matey-server/node_modules/express/lib/router/index.js:354:14)\r\n    at param (/Users/lucasantchougov/Documents/Work/matey/matey-server/node_modules/express/lib/router/index.js:365:14)\r\n```\r\n\r\nThe error seems to get thrown when `options.encode` is read in `Repository.writeFile`. It only works for me when passing an empty object. This should be better documented or a default empty object should be instantiated in the method.","author":{"url":"https://github.com/lantchou","@type":"Person","name":"lantchou"},"datePublished":"2019-08-09T10:09:06.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":3},"url":"https://github.com/577/github/issues/577"}

route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:03143956-869c-856e-bb90-15fbc60ca7eb
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idD7E8:1059D2:32B42FC:43BB11D:6971DD9A
html-safe-noncee39115a65f06999bf49d35735a21698682a879c2baacf9059e8eb00ba739daca
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEN0U4OjEwNTlEMjozMkI0MkZDOjQzQkIxMUQ6Njk3MUREOUEiLCJ2aXNpdG9yX2lkIjoiMjE4NDAxODc1OTAwNzcyMjkwNiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmace75af75383ae32b93dd3ff0098f26a55e0d618796388c07f59fb8a0021801368
hovercard-subject-tagissue:478908626
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/github-tools/github/577/issue_layout
twitter:imagehttps://opengraph.githubassets.com/7db81a37ad959f20e3f68fde747d705c5e9a8934b16bc6e18227f0a4d826b812/github-tools/github/issues/577
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/7db81a37ad959f20e3f68fde747d705c5e9a8934b16bc6e18227f0a4d826b812/github-tools/github/issues/577
og:image:altIn the documentation about Repository.writeFile, the options parameter is specified as optional. Despite this, the function fails if no options object is passed and throws this error: TypeError: Ca...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamelantchou
hostnamegithub.com
expected-hostnamegithub.com
None7476eb4140129667a7530d10cfb7688f701883e35a4dcaa4673e3ec599af5199
turbo-cache-controlno-preview
go-importgithub.com/github-tools/github git https://github.com/github-tools/github.git
octolytics-dimension-user_id16116810
octolytics-dimension-user_logingithub-tools
octolytics-dimension-repository_id3640925
octolytics-dimension-repository_nwogithub-tools/github
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id3640925
octolytics-dimension-repository_network_root_nwogithub-tools/github
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release2cc0827c872b538cd08371730242ae4951d2d61a
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://patch-diff.githubusercontent.com/github-tools/github/issues/577#start-of-content
https://patch-diff.githubusercontent.com/
Sign in https://patch-diff.githubusercontent.com/login?return_to=https%3A%2F%2Fgithub.com%2Fgithub-tools%2Fgithub%2Fissues%2F577
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub SparkBuild and deploy intelligent appshttps://github.com/features/spark
GitHub ModelsManage and compare promptshttps://github.com/features/models
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
GitHub SponsorsFund open source developershttps://github.com/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/accelerator
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://patch-diff.githubusercontent.com/login?return_to=https%3A%2F%2Fgithub.com%2Fgithub-tools%2Fgithub%2Fissues%2F577
Sign up https://patch-diff.githubusercontent.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=github-tools%2Fgithub
Reloadhttps://patch-diff.githubusercontent.com/github-tools/github/issues/577
Reloadhttps://patch-diff.githubusercontent.com/github-tools/github/issues/577
Reloadhttps://patch-diff.githubusercontent.com/github-tools/github/issues/577
github-tools https://patch-diff.githubusercontent.com/github-tools
githubhttps://patch-diff.githubusercontent.com/github-tools/github
Notifications https://patch-diff.githubusercontent.com/login?return_to=%2Fgithub-tools%2Fgithub
Fork 794 https://patch-diff.githubusercontent.com/login?return_to=%2Fgithub-tools%2Fgithub
Star 3.7k https://patch-diff.githubusercontent.com/login?return_to=%2Fgithub-tools%2Fgithub
Code https://patch-diff.githubusercontent.com/github-tools/github
Issues 147 https://patch-diff.githubusercontent.com/github-tools/github/issues
Pull requests 32 https://patch-diff.githubusercontent.com/github-tools/github/pulls
Actions https://patch-diff.githubusercontent.com/github-tools/github/actions
Projects 0 https://patch-diff.githubusercontent.com/github-tools/github/projects
Wiki https://patch-diff.githubusercontent.com/github-tools/github/wiki
Security Uh oh! There was an error while loading. Please reload this page. https://patch-diff.githubusercontent.com/github-tools/github/security
Please reload this pagehttps://patch-diff.githubusercontent.com/github-tools/github/issues/577
Insights https://patch-diff.githubusercontent.com/github-tools/github/pulse
Code https://patch-diff.githubusercontent.com/github-tools/github
Issues https://patch-diff.githubusercontent.com/github-tools/github/issues
Pull requests https://patch-diff.githubusercontent.com/github-tools/github/pulls
Actions https://patch-diff.githubusercontent.com/github-tools/github/actions
Projects https://patch-diff.githubusercontent.com/github-tools/github/projects
Wiki https://patch-diff.githubusercontent.com/github-tools/github/wiki
Security https://patch-diff.githubusercontent.com/github-tools/github/security
Insights https://patch-diff.githubusercontent.com/github-tools/github/pulse
New issuehttps://patch-diff.githubusercontent.com/login?return_to=https://github.com/github-tools/github/issues/577
New issuehttps://patch-diff.githubusercontent.com/login?return_to=https://github.com/github-tools/github/issues/577
Repository.writeFile fails if no options object is passedhttps://patch-diff.githubusercontent.com/github-tools/github/issues/577#top
https://github.com/lantchou
https://github.com/lantchou
lantchouhttps://github.com/lantchou
on Aug 9, 2019https://github.com/github-tools/github/issues/577#issue-478908626
documentationhttp://github-tools.github.io/github/docs/3.1.0/Repository.html#writeFile
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.