if (FALSE) { # interactive()
# Get repositories and create file mapping
repositories <- repos("my-organization")
mapping <- file_mapping(
"local/path/file1.R" = ".github/workflows/ci.yml",
"local/path/file2.R" = "R/utils.R"
)
# Create pull requests in all repositories
results <- pr_create(
repos = repositories,
branch_name = "feature-branch",
title = "Update CI workflow",
body = "Standardizing CI workflow across repositories",
file_mapping = mapping
)
# Simulate without making actual changes
dry_run_results <- pr_create(
repos = repositories,
branch_name = "feature-branch",
title = "Update documentation",
body = "Updating documentation with new examples",
file_mapping = mapping,
dry_run = TRUE
)
# Only create PRs in repositories where the branch already exists
existing_branch_results <- pr_create(
repos = repositories,
branch_name = "existing-branch",
title = "Fix existing branch",
body = "Apply fixes to existing branch",
file_mapping = mapping,
create_branch = FALSE
)
}
Run the code above in your browser using DataLab