Skip to content
This repository has been archived by the owner on Jun 24, 2024. It is now read-only.

Fix ensure_submission_repository_exists for import_resiliency beta #1413

Merged
merged 3 commits into from
Jul 19, 2018

Conversation

BenEmdon
Copy link
Contributor

@BenEmdon BenEmdon commented Jul 18, 2018

What

This PR changes the behavior in ensure_submission_repository_exists such that if an AssignmentRepo is created it redirects to #setupv2 when in the import_resiliency beta is enabled.

How

This behavior was happening in a before_action:
https://github.com/education/classroom/blob/cd1d7e63bd6dada2f7f76a79d7c447147c9ac8f1/app/controllers/assignment_invitations_controller.rb#L8

Didn't catch this when I made the original change in #1385

.github_repository
.present?(headers: GitHub::APIHeaders.no_cache_no_store)
.github_repository
.present?(headers: GitHub::APIHeaders.no_cache_no_store)

Choose a reason for hiding this comment

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

Layout/MultilineMethodCallIndentation: Align .present? with current_submission on line 96.

@@ -94,13 +94,17 @@ def join_roster
def ensure_submission_repository_exists
return not_found unless current_submission
return if current_submission
.github_repository
.present?(headers: GitHub::APIHeaders.no_cache_no_store)
.github_repository

Choose a reason for hiding this comment

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

Layout/MultilineMethodCallIndentation: Align .github_repository with current_submission on line 96.

.github_repository
.present?(headers: GitHub::APIHeaders.no_cache_no_store)
.github_repository
.present?(headers: GitHub::APIHeaders.no_cache_no_store)

Choose a reason for hiding this comment

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

Layout/MultilineMethodCallIndentation: Align .present? with current_submission on line 96.

@@ -94,13 +94,17 @@ def join_roster
def ensure_submission_repository_exists
return not_found unless current_submission
return if current_submission
.github_repository
.present?(headers: GitHub::APIHeaders.no_cache_no_store)
.github_repository

Choose a reason for hiding this comment

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

Layout/MultilineMethodCallIndentation: Align .github_repository with current_submission on line 96.

@BenEmdon BenEmdon changed the title Fix ensure_github_repo_exists for import_resiliency beta Fix ensure_submission_repository_exists for import_resiliency beta Jul 19, 2018
@BenEmdon BenEmdon merged commit a517f8f into master Jul 19, 2018
@BenEmdon BenEmdon deleted the ensure_github_repo_exists branch July 19, 2018 17:38
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants