Skip to content

Commit

Permalink
Remove previously added columns to avoid duplication
Browse files Browse the repository at this point in the history
'update.commit.interactions' no longer duplicates 'base.author' and
'interacting.author' columns

Signed-off-by: Leo Sendelbach <[email protected]>
  • Loading branch information
Leo-Send committed Feb 20, 2024
1 parent a6d4e09 commit 63f2737
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions util-data.R
Original file line number Diff line number Diff line change
Expand Up @@ -418,6 +418,16 @@ ProjectData = R6::R6Class("ProjectData",
self$get.commits()
}

## remove existing columns named 'base.author' and 'interaction.author'
indices.to.remove = which("base.author" == colnames(private$commit.interactions))
if (length(indices.to.remove)>0) {
private$commit.interactions = private$commit.interactions[, -indices.to.remove]
}
indices.to.remove = which("interacting.author" == colnames(private$commit.interactions))
if (length(indices.to.remove)>0) {
private$commit.interactions = private$commit.interactions[, -indices.to.remove]
}

## get relevant data from commits
commit.data.subset = data.frame(hash = private$commits.unfiltered[["hash"]],
author.name = private$commits.unfiltered[["author.name"]])
Expand Down

0 comments on commit 63f2737

Please sign in to comment.