Skip to content

Commit 6c0d0da

Browse files
author
Dominique Quatravaux
committed
[feature] pages tibble
1 parent 31374de commit 6c0d0da

File tree

1 file changed

+11
-5
lines changed

1 file changed

+11
-5
lines changed

confluence.R

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -201,13 +201,19 @@ bodies <- {
201201
filter(! is.na(content.CustomContentEntityObject)) %>%
202202
filter(type != "CustomContentEntityObject") %>%
203203
nrow == 0)
204+
bodies
205+
}
206+
207+
pages <- {
208+
page_bodies <- bodies %>% filter(! is.na(content.Page))
204209
## Page-like bodies should have a match in page_versions:
205-
stopifnot(bodies %>%
206-
filter(! is.na(content.Page)) %>%
207-
anti_join(page_versions,
208-
by = join_by(content.Page == content_id)) %>%
210+
by <- join_by(content.Page == content_id)
211+
stopifnot(page_bodies %>%
212+
anti_join(page_versions, by = by) %>%
209213
nrow == 0)
210-
bodies
214+
page_bodies %>%
215+
left_join(page_versions, by = by) %>%
216+
select(-starts_with("content."), -type)
211217
}
212218

213219
user2content <- {

0 commit comments

Comments
 (0)