Assign task lists and archived during sync#1158
Merged
Conversation
1ce82b0 to
53beb4d
Compare
joshsmith
requested changes
Nov 6, 2017
Contributor
joshsmith
left a comment
There was a problem hiding this comment.
This needs a migration that will take all the existing Tasks > 30 days and archive them.
| end | ||
| defp get_task_list(project_id, :pull_requests) do | ||
| TaskList |> Repo.get_by(project_id: project_id, pull_requests: true) | ||
| end |
Contributor
There was a problem hiding this comment.
It could be possible to reverse the project_id and atom here so that you could chain above:
%TaskList{id: task_list_id} =
github_issue
|> get_task_list_type()
|> get_task_list(project_id)| status = changeset |> Changeset.get_field(:status) | ||
|
|
||
| case {status, Timex.now |> Timex.diff(modified_at, :days)} do | ||
| {"closed", x} when x > 30 -> |
Contributor
There was a problem hiding this comment.
Would make x more verbose and descriptive here.
| @@ -21,15 +21,15 @@ defmodule CodeCorps.GitHub.Sync.Issue.Task do | |||
| `CodeCorps.GithubRepo` via a `CodeCorps.ProjectGithubRepo`, it | |||
Contributor
There was a problem hiding this comment.
This @doc needs to change to remove the mention of the payload.
Contributor
|
The Issue Adapter has also lost coverage of the |
- Associate task with proper task list when syncing from github - Add archiving of task during github sync - Ditch usage of issue attrs from Sync.Issue.Task.Changeset.build_changeset - Remove unused adapter clause - Unset task list if archived - Add migration to archive outdated tasks - Add testing of column sync to acceptance test
b6018ab to
339d4e2
Compare
joshsmith
approved these changes
Nov 6, 2017
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What's in this PR?
Closes #1153
Builds on top of #1157, so will have to be rebased once merged