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

Port [StackExchange] from legacy to BaseJsonService #2418

Merged
merged 6 commits into from
Nov 29, 2018

Conversation

bui1
Copy link
Contributor

@bui1 bui1 commented Nov 28, 2018

  • Per part of issue Last Discussed on Stack Overflow Badge Proposal #2378, convert StackExchange service to the newer BaseJson class.
  • Refactor also to seperate StackExchange reputation and questions tag info into new StackExchange sub service files as the legacy class contained both which may be difficult to keep track of in the future as the service continues to grow.
  • More tests have been added to make sure other StackExchange sites besides
    StackOverflow will still work with the new badge setup.

If merged, next step would be to add a new StackOverflow badge part of #2378.

Per part of issue badges#2378, convert StackExchange service to the newer
BaseJson class. Refactor also to seperate StackExchange reputation and
questions tag info into new StackExchange subservice files
as the legacy class contained both which may be difficult to keep track
of in the future as the service continues to grow.
More tests have been added to make sure other StackExchange sites besides
StackOverflow will still work with the new badge setup.

If merged, next step would be to add a new StackOverflow badge part of badges#2378.
@shields-ci
Copy link

Messages
📖 ✨ Thanks for your contribution to Shields, @bui1!

Generated by 🚫 dangerJS

@paulmelnikow paulmelnikow added the service-badge New or updated service badge label Nov 28, 2018
Copy link
Member

@paulmelnikow paulmelnikow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey, really nice work! I left a few comments, all minor.

@paulmelnikow
Copy link
Member

I deployed a review app: http://shields-staging-pr-2418.herokuapp.com/

Something's not quite right with the examples:

screen shot 2018-11-28 at 8 16 48 pm

@paulmelnikow paulmelnikow temporarily deployed to shields-staging-pr-2418 November 29, 2018 02:10 Inactive
@bui1
Copy link
Contributor Author

bui1 commented Nov 29, 2018

Thanks for all the feedback you gave @paulmelnikow 👍 It's really helpful especially for someone who is starting to contribute to open source

@paulmelnikow
Copy link
Member

Nice work! 🏆

And please keep it up! There's so much to do in this project and I and the other maintainers are happy to help you find more work that interests you.

@paulmelnikow paulmelnikow merged commit 9713964 into badges:master Nov 29, 2018
@shields-deployment
Copy link

This pull request was merged to master branch. This change is now waiting for deployment, which will usually happen within a few days. Stay tuned by joining our #ops channel on Discord!

After deployment, changes are copied to gh-pages branch:

@paulmelnikow
Copy link
Member

paulmelnikow commented Nov 29, 2018

This is deployed to s0 and it looks like it's not working quite right:

http://s0.shields-server.com/stackexchange/stackoverflow/r/893113.svg

This is the old code:

http://s1.shields-server.com/stackexchange/stackoverflow/r/893113.svg

Do you mind taking a look?

@bui1
Copy link
Contributor Author

bui1 commented Nov 29, 2018

Interesting so the new link you gave
http://s0.shields-server.com/stackexchange/stackoverflow/r/893113.svg

should be now routed to
http://s0.shields-server.com/stackexchange/r/stackoverflow/893113.svg

instead but I'm not sure why its returning invalid instead of the data we need.
Am looking into it right now.

@paulmelnikow
Copy link
Member

I'm not exactly sure what you mean. However, we should make sure the URL pattern that worked in the past also work going forward.

@bui1
Copy link
Contributor Author

bui1 commented Nov 29, 2018

Right, I'll need to rework these files then to use the past URL pattern. My apologies, I'll work on another PR for this 👍

@paulmelnikow
Copy link
Member

paulmelnikow commented Nov 29, 2018

Thanks! My bad for not noticing it during the review! The tests moved from one file to another and I didn't realize the routes changed.

I'm rolling back to 1a75790 until this is fixed.

@paulmelnikow
Copy link
Member

@bui1 Is this something you could do in the next day? It would be great to get other work shipped and this is a deploy blocker. If not, zero pressure, I could take in on.

bui1 added a commit to bui1/shields that referenced this pull request Nov 29, 2018
…#2418

Url patterns have been changed back to their older legacy format.
Tests now run properly with this URL in addition to the examples
showing up on local.
paulmelnikow pushed a commit that referenced this pull request Nov 30, 2018
…2418 (#2430)

* Fix URL pattern for StackExchange Questions and Reputation per #2418

Url patterns have been changed back to their older legacy format.
Tests now run properly with this URL in addition to the examples
showing up on local.

* Make changes per review comments. Also change "q" to "t" parameter to match legacy url for questions
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
service-badge New or updated service badge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants