Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"result.data.repositories" is deprecated. Use "result.data" instead #915

Closed
sunshineo opened this issue Apr 18, 2019 · 28 comments · Fixed by #919
Closed

"result.data.repositories" is deprecated. Use "result.data" instead #915

sunshineo opened this issue Apr 18, 2019 · 28 comments · Fixed by #919
Assignees
Labels

Comments

@sunshineo
Copy link

Bug Report

Current Behavior

When start got

{ Deprecation: [@octokit/rest] "result.data.repositories" is deprecated. Use "result.data" instead
    at Array.get (/Users/gordon/workspace/ir/bot/node_modules/@octokit/rest/plugins/pagination/normalize-paginated-list-response.js:59:39)
    at /Users/gordon/workspace/ir/bot/node_modules/probot/lib/apps/stats.js:93:70
    at iterator.next.then.result (/Users/gordon/workspace/ir/bot/node_modules/@octokit/rest/plugins/pagination/paginate.js:26:40) name: 'Deprecation' }

Expected behavior/code
No warnings

Environment
"probot": "^9.2.4"

  • Node/npm version: v11.10.0/6.7.0
  • OS: mac
@issue-label-bot issue-label-bot bot added the bug label Apr 18, 2019
@welcome
Copy link

welcome bot commented Apr 18, 2019

Thanks for opening this issue. A contributor should be by to give feedback soon. In the meantime, please check out the contributing guidelines and explore other ways you can get involved.

@issue-label-bot
Copy link

Issue-Label Bot is automatically applying the label bug 🐞 to this issue, with a confidence of 0.94. Please mark this comment with 👍 or 👎 to give our bot feedback!

Links: app homepage, dashboard and code for this bot.

@gr2m
Copy link
Contributor

gr2m commented Apr 18, 2019

Thanks Gordon!

I think the line emitting the deprecation is

return response.data.repositories.filter((repository: Repository) => !repository.private)

Would you like to send a pull request to get it fixed?

@sunshineo
Copy link
Author

sunshineo commented Apr 19, 2019

Hi @gr2m , you know what I would like to do? I'd like to pay you $10 to fix it. I know this sounds really strange but hear me out. The reason that I encountered this error is I'm building a bot using probot. It's in beta now https://github.com/apps/issue-reward-beta . What it does is that, for the repo installed it, it automatically comment on all the issues with an url to a website that allows anyone to give some money reward to incentivize others to fix the issue. Basically crowdfund to have issues fixed. https://ir-web-staging.herokuapp.com

I know I may have a hard time getting repo admins to install my app, so the website also allows you paste any github issue url and give it some reward. And I just created a $10 one for this issue at
https://ir-web-staging.herokuapp.com/issue/uktaXG6TWJ

The site is using PayPal sandbox env now, so the money is fake. But I would love you to try it out and give me some feedback. I would be really happy if you install it for this repo! I would send you $10 for real with PayPal

Thank you!

GitHub
GitHub is where people build software. More than 31 million people use GitHub to discover, fork, and contribute to over 100 million projects.

@gr2m
Copy link
Contributor

gr2m commented Apr 19, 2019

I’m not interested but maybe some else will be :)

@sunshineo
Copy link
Author

Hi @gr2m , I want to ask you one last question. As a repo admin, even you are not interested in fixing issues for money, do you think it would make the project healthy if you add the bot that, as I described above, comments on issues to encourage people give reward and fix issues? What features or values you need to see to install such a bot?

@tcbyrd
Copy link
Contributor

tcbyrd commented Apr 19, 2019

Hey @sunshineo. Since Probot is a project maintained primarily by people employed by GitHub, our repo probably isn't the right place to test out this kind of bot since we are already compensated in other ways. I like the idea though, and I'm sure other maintainers might enjoy using it. I know a lot of projects have Patreon pages, for example, and a bot that responds to merged pull requests to remind people to subscribe to their Patreon might be very useful.

@sunshineo
Copy link
Author

sunshineo commented Apr 19, 2019

Thank you @tcbyrd ! I did not know projects using Patreon. I've seen one project using https://opencollective.com/ . Could you point me to a couple of projects using Patreon? I would love to talk to their admin. I think what I'm trying to do is different from a Patreon model, but using Github issue as the first class citizen and having a more streamlined process with the Github eco system. I hope you guys at Github support me on this. Best wishes!

@tcbyrd
Copy link
Contributor

tcbyrd commented Apr 22, 2019

Could you point me to a couple of projects using Patreon?

I don't know any personally and can't recall any by name, but I know I've come across READMEs that had a Patreon button in them.

@yingren-wang
Copy link

@gr2m I have the same problem as the title after installing the latest debug and Winston npm packages but still don't know how to solve it after reading through the comment. There's nowhere in my code using result.data.repositories, though I use result.data several times including things like result.data.number and result.data.mergeable. I have also tried to change result.data.number to result.data.pull_number as what is mentioned in #917, but it's still not working. Please give me a more detailed suggestion/solution, thx

@gr2m
Copy link
Contributor

gr2m commented Apr 23, 2019

@dead-programmer it’s used in Probot itself, it has to be fixed in probot itself. I’ve referenced the line in my comment above: #915 (comment)

We’ll need someone to send a pull request to fix that line and bump the version range for @octokit/rest in package.json to require the latest version

@sunshineo
Copy link
Author

sunshineo commented Apr 24, 2019

I just added a $10 reward for this issue. The total reward now is $10. You can check it out here: https://www.issuereward.com/issue/tL5Cv2ILfC
I suggest admin of this repo install the Issue Reward bot from https://github.com/apps/issue-reward-beta

GitHub
GitHub is where people build software. More than 31 million people use GitHub to discover, fork, and contribute to over 100 million projects.

@sunshineo
Copy link
Author

I have released the bot I built together with the website to beta. The first thing I did with it is to add an award for this issue. The comment above is generated by the website and I copy pasted it over. I realized it reads a little strange after posting it. If this repo installed the bot then all these activities will be commented by a bot in a 3rd person tone. I'll keep working on it. Thank you for your hard work on this awesome project!

@gr2m gr2m self-assigned this Apr 24, 2019
@gr2m gr2m closed this as completed in #919 Apr 24, 2019
@probotbot
Copy link

🎉 This issue has been resolved in version 9.2.8 🎉

The release is available on:

Your semantic-release bot 📦🚀

@sunshineo
Copy link
Author

sunshineo commented Apr 24, 2019

yarn remove probot
yarn add probot

I confirm that after upgrade to 9.2.8 the error message went away!
Thank you @gr2m . Please claim the $10 on https://www.issuereward.com/issue/tL5Cv2ILfC
Let me know if the website is working or not

@gr2m
Copy link
Contributor

gr2m commented Apr 24, 2019

I got an error

Failed to save user Github login and email

Not sure if that might be the problem, but the redirect URL did not pass a state

https://www.issuereward.com/callback?code=7f4e62719a09374c0ba0&state=

@sunshineo
Copy link
Author

@gr2m So sorry about that. I'll debug it

@sunshineo
Copy link
Author

@gr2m I guess the error was that when I ask Github for your basic information, there is something special about your email that I failed to properly save. I've added a check. Please try again. Maybe use the Login/Logout on the top right corner first. If it still fails, could you tell me what is in the console log? Thank you very much! I super appreciate the help

@gr2m
Copy link
Contributor

gr2m commented Apr 24, 2019

Login worked now. But when I hit the claim button, nothing happens. POST https://ir-parse-server.herokuapp.com/parse/classes/claim fails

{"code":111,"error":"schema mismatch for claim.approvedAmount; expected String but got Number"}

@sunshineo
Copy link
Author

It's fixed. Please try again.

I'm so sorry about that. I made a dumb mistake in the schema of the production database. I did not make that mistake in my testing database, so I did not find that issue. And because I was cutting corners, I did not use a tool or system to properly manage the database schemas. I was manually creating the tables twice. And I made this embarrassing mistake on the production database.

@gr2m
Copy link
Contributor

gr2m commented Apr 24, 2019

I fixed this issue and want to claim the existing $10 reward for it.
@sunshineo , all of you have give reward for this issue. Thank you very much and please approve my claim at https://www.issuereward.com//claim/HTYEMjdOby so I can receive it.

@sunshineo
Copy link
Author

sunshineo commented Apr 24, 2019

@sunshineo just approved a $10 reward to @gr2m . See details here: https://www.issuereward.com/claim/HTYEMjdOby
@gr2m can now go to his/her account page to request a cashout. https://www.issuereward.com/my-account
I suggest admin of this repo install the Issue Reward bot from https://github.com/apps/issue-reward-beta

GitHub
GitHub is where people build software. More than 31 million people use GitHub to discover, fork, and contribute to over 100 million projects.

@gr2m
Copy link
Contributor

gr2m commented Apr 25, 2019

@sunshineo replace his/her with their to make it inclusive. It’s totally fine to use their to address a single person. And it doesn’t exclude people who don’t identify as either male or female.

That seems to have worked, I see the cashout request as pending. :) I’ll donate the $10 to https://railsgirlssummerofcode.org/, thanks!

Rails Girls Summer of Code
Rails Girls Summer of Code 2019

@sunshineo
Copy link
Author

Thank you @gr2m . I'll change it. I don't trust myself to write something that does auto cashout, so the cashout part is manual. I'm sending you the money right now. Thank you very much for helping me.

I noticed my links are not working with unfurl-links bot. I should add more metadata

@sunshineo
Copy link
Author

@gr2m PayPal charged me $1 fee for the $10 transaction because "The receiver of this payment is Non-US - Verified" 👎

@gr2m
Copy link
Contributor

gr2m commented Apr 25, 2019

Sorry, I created it back in Europe and they don’t let me move it 😭

@sunshineo
Copy link
Author

No worries. I should work on a donate feature that allows people to directly donate to charities without the need to cashout first

@gr2m
Copy link
Contributor

gr2m commented Apr 25, 2019

yours found its way already: https://railsgirlssummerofcode.org/campaign#donors

image

Cheers!

Rails Girls Summer of Code
Rails Girls Summer of Code 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants