Skip to content

Commit

Permalink
[#312] add todo comments
Browse files Browse the repository at this point in the history
  • Loading branch information
mbao01 committed May 30, 2022
1 parent 5189973 commit e05e10c
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 8 deletions.
4 changes: 3 additions & 1 deletion 0pdd.rb
Original file line number Diff line number Diff line change
Expand Up @@ -380,6 +380,8 @@ def merged(hash)
end

def storage(repo)
# @todo #312:30min Handle the use case where projects from different vcs have
# the same <user/repo_name>. This will cause a conflict.
SyncStorage.new(
UpgradedStorage.new(
SafeStorage.new(
Expand Down Expand Up @@ -424,7 +426,7 @@ def process_request(vcs)
vcs,
Job.new(
vcs,
storage(vcs.repo.name, vcs.name),
storage(vcs.repo.name),
SentryTickets.new(
EmailedTickets.new(
vcs,
Expand Down
9 changes: 2 additions & 7 deletions objects/jobs/job.rb
Original file line number Diff line number Diff line change
Expand Up @@ -30,19 +30,14 @@ def initialize(vcs, storage, tickets)
@vcs = vcs
@storage = storage
@tickets = tickets
@initial_puzzles = nil
end

def proceed
@vcs.repo.push
@initial_puzzles = @storage.load
before = @storage.load
Puzzles.new(@vcs.repo, @storage).deploy(@tickets)
return if opts.include?('on-scope')
Diff.new(@initial_puzzles, @storage.load).notify(@tickets)
rescue Octokit::ClientError => e
# TODO: this is a temporary solution, we should use a logger
save(@initial_puzzles) if @initial_puzzles
throw e
Diff.new(before, @storage.load).notify(@tickets)
end

private
Expand Down
2 changes: 2 additions & 0 deletions objects/log.rb
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@
class Log
def initialize(dynamo, repo)
@dynamo = dynamo
# @todo #312:30min Be sure to handle the use case where projects from
# different vcs have the same <user/repo_name>. This will cause a conflict.
@repo = repo
end

Expand Down

3 comments on commit e05e10c

@0pdd
Copy link
Collaborator

@0pdd 0pdd commented on e05e10c May 30, 2022

Choose a reason for hiding this comment

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

Puzzle 41-65582b0c disappeared from 0pdd.rb, that's why I closed #349. Please, remember that the puzzle was not necessarily removed in this particular commit. Maybe it happened earlier, but we discovered this fact only now.

@0pdd
Copy link
Collaborator

@0pdd 0pdd commented on e05e10c May 30, 2022

Choose a reason for hiding this comment

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

Puzzle 312-3e51e119 discovered in 0pdd.rb and submitted as #353. Please, remember that the puzzle was not necessarily added in this particular commit. Maybe it was added earlier, but we discovered it only now.

@0pdd
Copy link
Collaborator

@0pdd 0pdd commented on e05e10c May 30, 2022

Choose a reason for hiding this comment

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

Puzzle 312-68d60ea6 discovered in objects/log.rb and submitted as #354. Please, remember that the puzzle was not necessarily added in this particular commit. Maybe it was added earlier, but we discovered it only now.

Please sign in to comment.