Skip to content
This repository has been archived by the owner on Nov 10, 2022. It is now read-only.

Update scripts to account for Github supporters #647

Closed
ilyavolodin opened this issue Nov 13, 2019 · 7 comments
Closed

Update scripts to account for Github supporters #647

ilyavolodin opened this issue Nov 13, 2019 · 7 comments
Labels
chore This change is not user-facing

Comments

@ilyavolodin
Copy link
Member

Currently our scripts are only checking OpenCollective for supporters to send twitter messages about and adding them to the site/readme. Now that ESLint org can be supported through Github, we need to update those scripts to use Github API for the same tasks as well.

@ilyavolodin ilyavolodin added the chore This change is not user-facing label Nov 13, 2019
@nzakas
Copy link
Member

nzakas commented Nov 14, 2019

I took a quick look at this, and it seems like the GraphQL API isn't (yet?) returning data for sponsors. I tried using a modified version of the script I'm using to pull my personal sponsors list (which does work).

GraphQL query
query{
    organization(login:"eslint") {
      sponsorsListing {
        tiers(first: 100) {
          nodes {
            name
            monthlyPriceInDollars
            adminInfo {
              sponsorships(first: 100) {
                nodes {
                  sponsor {
                    avatarUrl
                    name
                    url
                  }
                }
              }
            }
          }
        }
      }
    }
  }

The list of sponsors should be in the adminInfo key, but it comes back as null. Do you have a contact for reporting problems?

@ilyavolodin
Copy link
Member Author

We currently don't have any sponsors on GitHub yet, so that's most likely why it doesn't return anything yet.

@kaicataldo
Copy link
Member

@ilyavolodin It looks like we do have a few sponsors.

@ilyavolodin
Copy link
Member Author

Oh, they just joined today, I guess. I was playing with the GraphQL API yesterday evening and there was no sponsors yet.

@ilyavolodin
Copy link
Member Author

API does return data. Here's the query:

query {
  organization(login: "eslint") {
    sponsorshipsAsMaintainer (first: 100) {
      nodes {
        sponsor {
          name,
          login
        },
        tier {
          monthlyPriceInDollars
        }
      }
    }
  }
}

You can run it here: https://developer.github.com/v4/explorer/

@nzakas
Copy link
Member

nzakas commented Nov 15, 2019

Nice! I can try updating the script next week but anyone should feel free to take this on in the meantime if the spirit moves you.

@nzakas
Copy link
Member

nzakas commented Nov 20, 2019

Starting to work on this.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
chore This change is not user-facing
Projects
None yet
Development

No branches or pull requests

3 participants