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

Commit

Permalink
updated query
Browse files Browse the repository at this point in the history
  • Loading branch information
hamelsmu committed May 10, 2019
1 parent 5ad10d3 commit d115333
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions flask_app/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
import requests
import yaml


app = Flask(__name__)
app_url = os.getenv('APP_URL')

Expand Down Expand Up @@ -272,7 +271,7 @@ def health_check():
def update_feedback(owner, repo):
"Update feedback for predicted labels for an owner/repo"
# authenticate webhook to make sure it is from GitHub
issues = Issues.query.filter(Issues.username == owner, Issues.repo == repo).all()
issues = Issues.query.filter(Issues.username == owner, Issues.repo == repo).order_by(Issues.issue_num.desc()).limit(50).all()
issue_numbers = [x.issue_id for x in issues]

# only update last 100 things to prevent edge cases on repos with large number of issues.
Expand Down

0 comments on commit d115333

Please sign in to comment.