Skip to content

Commit

Permalink
added flash to warn user that no github pull request links have been …
Browse files Browse the repository at this point in the history
…added
  • Loading branch information
brwali committed Nov 22, 2024
1 parent b76849a commit fc865d6
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions app/controllers/metrics_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -95,9 +95,12 @@ def retrieve_github_data
pull_links = team_links.select do |link|
link.match(/pull/) && link.match(/github.com/) # all links that contain both pull and github.com
end
if !pull_links.empty? # have pull links, retrieve pull request info
query_all_pull_requests(pull_links)
if pull_links.empty? # No PR links found
flash[:error] = 'No pull request links have been submitted by this team.'
redirect_to controller: 'assignments', action: 'list_submissions', id: @assignment.id and return
end
# If pull links are present, retrieve pull request info
query_all_pull_requests(pull_links)
end


Expand Down

0 comments on commit fc865d6

Please sign in to comment.