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

Exclude inactive sponsors and backers #4595

Closed
outsideris opened this issue Mar 5, 2021 · 6 comments · Fixed by #4596
Closed

Exclude inactive sponsors and backers #4595

outsideris opened this issue Mar 5, 2021 · 6 comments · Fixed by #4596
Labels
area: documentation anything involving docs or mochajs.org area: website involving mochajs.org, but not necessarily involving docs

Comments

@outsideris
Copy link
Contributor

We can discuss whether we exclude inactive sponsors and backers from our mochajs.org.
Of course, we thank both past and current sponsors and backers. But we can't show all accumulated sponsors and backers because it is too long list.

Below are @juergba 's comment from #4570 and I think last donation more than one year ago is good base line.

I had a quick look at opencollective's API. The information lastTransactionAt seems to be available. We should list active sponsors/backers only and exclude the older ones (last donation more than one year ago).

With the URL https://opencollective.com/mochajs/members/all.json we can export our contributor data in JSON format.
The JSON file also includes a property lastTransactionAt to distinguish active from inactive sponsors/backers.
IMO we should exclude inactive contributors.

@outsideris outsideris added area: documentation anything involving docs or mochajs.org area: website involving mochajs.org, but not necessarily involving docs labels Mar 5, 2021
@juergba
Copy link
Contributor

juergba commented Mar 6, 2021

+1 for limiting our listings to active sponsors/backers.
Above mentioned JSON file unfortunately doesn't contain the category property we need for our spam filter.

@juergba
Copy link
Contributor

juergba commented Mar 6, 2021

@znarf We select our backers/sponsors in supporters.js, you have contributed to this code in the past as well (category).
Maybe you can give us a hint where to add a filter, eg. sponsors/backers who haven't contributed since one year will be considered inactive.

Which date field can we use to filter active backers/sponsors?

  • Order.updatedAt: is this the date of the last transaction?
  • or do we have to check for Transaction.createdAt or updatedAt?

I'm new with the OpenCollective's API and any help would be appreciated. Thanks.

Edit: I was playing with the Web version of GraphQL Playground and tried to filter Orders by various criterias. I got the query working with status: ACTIVE, but it fails with minAmount: 30 or dateFrom: .... It's confusing.
I haven't understood either the exact content of Order, the docs just states: OBJECT - Order - Order model.

Maybe it's easier than I thought. We select Order with status: ACTIVE and frequency: MONTHLY. Then we only need to filter amount>5. It's the state which matters and not the last contribution date.

@juergba juergba added the status: accepting prs Mocha can use your help with this one! label Mar 6, 2021
@juergba
Copy link
Contributor

juergba commented Mar 7, 2021

@outsideris I pushed a filter with status: ACTIVE to the mochajs.org branch. The listing is much smaller now!
Can you have a look, please?

I still wonder:

  • why USD5 contributions appear in the sponsors section?
  • why do we exclude VPN contributions from listing? I think we should list them.

@juergba
Copy link
Contributor

juergba commented Mar 7, 2021

why USD5 contributions appear in the sponsors section?

Done. Actually we have only one active sponsor left! 😔

@juergba juergba removed the status: accepting prs Mocha can use your help with this one! label Mar 8, 2021
@juergba
Copy link
Contributor

juergba commented Mar 8, 2021

Btw account codepilotai with the unsupported image type has status===CANCELLED and won't be selected anymore.

@outsideris
Copy link
Contributor Author

Sorry for the late response.
It's a surprise we have only one sponsor.

Anyway, LGTM.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: documentation anything involving docs or mochajs.org area: website involving mochajs.org, but not necessarily involving docs
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants