{"action":"created","comment":{"url":"https://api.github.com/repos/redhat-documentation/community-contribution-template/pulls/comments/137506066","pull_request_review_id":61181172,"id":137506066,"diff_hunk":"@@ -1,11 +1,153 @@\n+[[ccg-create-repo]]\n == Creating a New Repository\n \n Placeholder text.\n \n+[[ccg-create-repo-setup]]\n === Setting up the Repository\n \n Placeholder text.\n \n+[[ccg-create-repo-synch]]\n === Configuring Content Synchronization\n \n Placeholder text.\n+\n+[[ccg-create-repo-synch-methods]]\n+==== Synchronization Methods\n+\n+The following synchronization methods are currently recommended:\n+\n+* <<ccg-create-repo-synch-batchcommit,Batch Commit>>\n+\n+\n+[[ccg-create-repo-synch-batchcommit]]\n+==== Batch Commit Synchronization Method\n+\n+[[ccg-create-repo-synch-batchcommit-when]]\n+===== When to Use this Approach\n+\n+The batch commit process is a good approach to use when you need to incorporate upstream content into product documentation and the product contains a good deal of additional product-specific content.\n+In other words, when the upstream content is included as a _subset_ of the product documentation.\n+\n+[[ccg-create-repo-synch-batchcommit-prereq]]\n+===== Prerequisites\n+\n+The batch commit method assumes that your upstream repository is hosted on GitHub and the machine where you run the batch commit script has the following utilities installed:\n+\n+* `curl`\n+* `zip`\n+\n+[[ccg-create-repo-synch-batchcommit-dir]]\n+===== Directory Structure\n+\n+The batch commit example described here assumes that you have a book directory, `my-sample-book`, structured as follows:\n+\n+----\n+my-sample-book/\n+|__ fetch-upstream.sh\n+|__ docinfo.xml\n+|__ master.adoc\n+|__ topics/\n+|__ upstream/\n+----\n+\n+Where `fetch-upstream.sh` is the batch commit script (for details, see <<ccg-create-repo-synch-batchcommit-script>>), and `upstream` is a subdirectory reserved for the upstream content.\n+\n+[[ccg-create-repo-synch-batchcommit-workflow]]\n+===== Workflow\n+\n+Given that you already have a batch commit script, `fetch-upstream.sh`, the workflow for synchronizing content from the upstream repository is as follows:\n+\n+. Pull down the latest content from the upstream repository and put the downloaded files in the `upstream/` subdirectory:\n++\n+----\n+$ ./fetch-upstream.sh\n+----\n+\n+. Inspect the downloaded content (for example, using `git diff`) to check for new files, restructured content, and so on.\n+If necessary, edit the book file, `master.adoc`, to incorporate new content.\n+\n+. Add and commit the downloaded content:\n++\n+----\n+$ git add upstream\n+$ git commit -m \"Synched content from upstream\"\n+----\n+\n+[[ccg-create-repo-synch-batchcommit-script]]\n+===== Sample Batch Commit Script\n+\n+The batch commit script, `fetch-upstream.sh`, is a simple `bash` script that pulls down the latest upstream content, copying the relevant upstream files into the `upstream` subdirectory.\n+The script exploits a particular feature of GitHub, whereby GitHub provides a downloadable archive file containing the working tree for any branch in the repository.\n+The archive file contains a snapshot of the _latest_ content in a particular branch and thus provides an ideal basis for synchronizing content downstream.\n+\n+To see how his works, consider the following sample `fetch-upstream.sh` script that was developed for synchronizing the contents of the _Apache Camel Component Reference_:\n+\n+----\n+#!/bin/sh\n+\n+branch=camel-2.18.x <1>\n+\n+echo \"info: fetching upstream content from branch: $branch\"\n+echo\n+\n+# -L = follow redirects\n+curl -L -o $branch.zip https://github.com/apache/camel/archive/$branch.zip <2>\n+\n+# -o = overwrite, -j = flatten directory structure, -q = quiet\n+unzip -qjo -d upstream $branch.zip camel-$branch/components/camel-*/src/main/docs/*.adoc <3>\n+unzip -qjo -d upstream/images $branch.zip camel-$branch/components/camel-*/src/main/docs/*.png\n+unzip -qjo -d upstream $branch.zip camel-$branch/camel-core/src/main/docs/*-component.adoc\n+\n+rm $branch.zip <4>\n+----\n+\n+<1> Set the `branch` variable to the name of the upstream branch.\n+<2> Download the archive (`.zip`) file from GitHub, which contains a snapshot of the latest content from the `$branch` branch and store it locally as the file, `$branch.zip`.\n+<3> Extract the relevant documentation files from the archive and put them into the `upstream` subdirectory.\n+Note that the `unzip` command is a remarkably flexible tool for extracting content from the archive.\n+In this particular case, the Asciidoc files are embedded in the Java code base and scattered across hundreds of subdirectories.\n+But thanks to the globbing capabilities of `unzip`, it takes only a few commands to find and extract all of the relevant files.","path":"doc-Community_Collaboration_Guide/topics/creating_a_new_repository.adoc","position":111,"original_position":111,"commit_id":"9f780365a42346e005074354a58b65bbd07b6608","original_commit_id":"9f780365a42346e005074354a58b65bbd07b6608","user":{"login":"anjsupsri","id":12249232,"avatar_url":"https://avatars3.githubusercontent.com/u/12249232?v=4","gravatar_id":"","url":"https://api.github.com/users/anjsupsri","html_url":"https://github.com/anjsupsri","followers_url":"https://api.github.com/users/anjsupsri/followers","following_url":"https://api.github.com/users/anjsupsri/following{/other_user}","gists_url":"https://api.github.com/users/anjsupsri/gists{/gist_id}","starred_url":"https://api.github.com/users/anjsupsri/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/anjsupsri/subscriptions","organizations_url":"https://api.github.com/users/anjsupsri/orgs","repos_url":"https://api.github.com/users/anjsupsri/repos","events_url":"https://api.github.com/users/anjsupsri/events{/privacy}","received_events_url":"https://api.github.com/users/anjsupsri/received_events","type":"User","site_admin":false},"body":"suggestion: extract all the relevant files.","created_at":"2017-09-07T10:46:51Z","updated_at":"2017-09-07T10:46:52Z","html_url":"https://github.com/redhat-documentation/community-contribution-template/pull/23#discussion_r137506066","pull_request_url":"https://api.github.com/repos/redhat-documentation/community-contribution-template/pulls/23","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/redhat-documentation/community-contribution-template/pulls/comments/137506066"},"html":{"href":"https://github.com/redhat-documentation/community-contribution-template/pull/23#discussion_r137506066"},"pull_request":{"href":"https://api.github.com/repos/redhat-documentation/community-contribution-template/pulls/23"}}},"pull_request":{"url":"https://api.github.com/repos/redhat-documentation/community-contribution-template/pulls/23","id":132984491,"html_url":"https://github.com/redhat-documentation/community-contribution-template/pull/23","diff_url":"https://github.com/redhat-documentation/community-contribution-template/pull/23.diff","patch_url":"https://github.com/redhat-documentation/community-contribution-template/pull/23.patch","issue_url":"https://api.github.com/repos/redhat-documentation/community-contribution-template/issues/23","number":23,"state":"open","locked":false,"title":"WIP: documenting synchronization with batch commit process","user":{"login":"fbolton","id":397343,"avatar_url":"https://avatars1.githubusercontent.com/u/397343?v=4","gravatar_id":"","url":"https://api.github.com/users/fbolton","html_url":"https://github.com/fbolton","followers_url":"https://api.github.com/users/fbolton/followers","following_url":"https://api.github.com/users/fbolton/following{/other_user}","gists_url":"https://api.github.com/users/fbolton/gists{/gist_id}","starred_url":"https://api.github.com/users/fbolton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fbolton/subscriptions","organizations_url":"https://api.github.com/users/fbolton/orgs","repos_url":"https://api.github.com/users/fbolton/repos","events_url":"https://api.github.com/users/fbolton/events{/privacy}","received_events_url":"https://api.github.com/users/fbolton/received_events","type":"User","site_admin":false},"body":"This is the first draft of the batch commit process, ready for review.","created_at":"2017-07-28T14:44:04Z","updated_at":"2017-09-07T10:46:52Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c01fd23185eea94065afd050c41801ed073eaa3e","assignee":null,"assignees":[],"requested_reviewers":[{"login":"adahms","id":5878686,"avatar_url":"https://avatars2.githubusercontent.com/u/5878686?v=4","gravatar_id":"","url":"https://api.github.com/users/adahms","html_url":"https://github.com/adahms","followers_url":"https://api.github.com/users/adahms/followers","following_url":"https://api.github.com/users/adahms/following{/other_user}","gists_url":"https://api.github.com/users/adahms/gists{/gist_id}","starred_url":"https://api.github.com/users/adahms/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adahms/subscriptions","organizations_url":"https://api.github.com/users/adahms/orgs","repos_url":"https://api.github.com/users/adahms/repos","events_url":"https://api.github.com/users/adahms/events{/privacy}","received_events_url":"https://api.github.com/users/adahms/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/redhat-documentation/community-contribution-template/pulls/23/commits","review_comments_url":"https://api.github.com/repos/redhat-documentation/community-contribution-template/pulls/23/comments","review_comment_url":"https://api.github.com/repos/redhat-documentation/community-contribution-template/pulls/comments{/number}","comments_url":"https://api.github.com/repos/redhat-documentation/community-contribution-template/issues/23/comments","statuses_url":"https://api.github.com/repos/redhat-documentation/community-contribution-template/statuses/9f780365a42346e005074354a58b65bbd07b6608","head":{"label":"redhat-documentation:wip-batch-commit","ref":"wip-batch-commit","sha":"9f780365a42346e005074354a58b65bbd07b6608","user":{"login":"redhat-documentation","id":27931071,"avatar_url":"https://avatars1.githubusercontent.com/u/27931071?v=4","gravatar_id":"","url":"https://api.github.com/users/redhat-documentation","html_url":"https://github.com/redhat-documentation","followers_url":"https://api.github.com/users/redhat-documentation/followers","following_url":"https://api.github.com/users/redhat-documentation/following{/other_user}","gists_url":"https://api.github.com/users/redhat-documentation/gists{/gist_id}","starred_url":"https://api.github.com/users/redhat-documentation/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/redhat-documentation/subscriptions","organizations_url":"https://api.github.com/users/redhat-documentation/orgs","repos_url":"https://api.github.com/users/redhat-documentation/repos","events_url":"https://api.github.com/users/redhat-documentation/events{/privacy}","received_events_url":"https://api.github.com/users/redhat-documentation/received_events","type":"Organization","site_admin":false},"repo":{"id":89360745,"name":"community-contribution-template","full_name":"redhat-documentation/community-contribution-template","owner":{"login":"redhat-documentation","id":27931071,"avatar_url":"https://avatars1.githubusercontent.com/u/27931071?v=4","gravatar_id":"","url":"https://api.github.com/users/redhat-documentation","html_url":"https://github.com/redhat-documentation","followers_url":"https://api.github.com/users/redhat-documentation/followers","following_url":"https://api.github.com/users/redhat-documentation/following{/other_user}","gists_url":"https://api.github.com/users/redhat-documentation/gists{/gist_id}","starred_url":"https://api.github.com/users/redhat-documentation/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/redhat-documentation/subscriptions","organizations_url":"https://api.github.com/users/redhat-documentation/orgs","repos_url":"https://api.github.com/users/redhat-documentation/repos","events_url":"https://api.github.com/users/redhat-documentation/events{/privacy}","received_events_url":"https://api.github.com/users/redhat-documentation/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/redhat-documentation/community-contribution-template","description":"Provides a template for setting up or migrating to a Git repository structure where content can be easily shared between two or more remotes that each have different requirements for content and branding.","fork":false,"url":"https://api.github.com/repos/redhat-documentation/community-contribution-template","forks_url":"https://api.github.com/repos/redhat-documentation/community-contribution-template/forks","keys_url":"https://api.github.com/repos/redhat-documentation/community-contribution-template/keys{/key_id}","collaborators_url":"https://api.github.com/repos/redhat-documentation/community-contribution-template/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/redhat-documentation/community-contribution-template/teams","hooks_url":"https://api.github.com/repos/redhat-documentation/community-contribution-template/hooks","issue_events_url":"https://api.github.com/repos/redhat-documentation/community-contribution-template/issues/events{/number}","events_url":"https://api.github.com/repos/redhat-documentation/community-contribution-template/events","assignees_url":"https://api.github.com/repos/redhat-documentation/community-contribution-template/assignees{/user}","branches_url":"https://api.github.com/repos/redhat-documentation/community-contribution-template/branches{/branch}","tags_url":"https://api.github.com/repos/redhat-documentation/community-contribution-template/tags","blobs_url":"https://api.github.com/repos/redhat-documentation/community-contribution-template/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/redhat-documentation/community-contribution-template/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/redhat-documentation/community-contribution-template/git/refs{/sha}","trees_url":"https://api.github.com/repos/redhat-documentation/community-contribution-template/git/trees{/sha}","statuses_url":"https://api.github.com/repos/redhat-documentation/community-contribution-template/statuses/{sha}","languages_url":"https://api.github.com/repos/redhat-documentation/community-contribution-template/languages","stargazers_url":"https://api.github.com/repos/redhat-documentation/community-contribution-template/stargazers","contributors_url":"https://api.github.com/repos/redhat-documentation/community-contribution-template/contributors","subscribers_url":"https://api.github.com/repos/redhat-documentation/community-contribution-template/subscribers","subscription_url":"https://api.github.com/repos/redhat-documentation/community-contribution-template/subscription","commits_url":"https://api.github.com/repos/redhat-documentation/community-contribution-template/commits{/sha}","git_commits_url":"https://api.github.com/repos/redhat-documentation/community-contribution-template/git/commits{/sha}","comments_url":"https://api.github.com/repos/redhat-documentation/community-contribution-template/comments{/number}","issue_comment_url":"https://api.github.com/repos/redhat-documentation/community-contribution-template/issues/comments{/number}","contents_url":"https://api.github.com/repos/redhat-documentation/community-contribution-template/contents/{+path}","compare_url":"https://api.github.com/repos/redhat-documentation/community-contribution-template/compare/{base}...{head}","merges_url":"https://api.github.com/repos/redhat-documentation/community-contribution-template/merges","archive_url":"https://api.github.com/repos/redhat-documentation/community-contribution-template/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/redhat-documentation/community-contribution-template/downloads","issues_url":"https://api.github.com/repos/redhat-documentation/community-contribution-template/issues{/number}","pulls_url":"https://api.github.com/repos/redhat-documentation/community-contribution-template/pulls{/number}","milestones_url":"https://api.github.com/repos/redhat-documentation/community-contribution-template/milestones{/number}","notifications_url":"https://api.github.com/repos/redhat-documentation/community-contribution-template/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/redhat-documentation/community-contribution-template/labels{/name}","releases_url":"https://api.github.com/repos/redhat-documentation/community-contribution-template/releases{/id}","deployments_url":"https://api.github.com/repos/redhat-documentation/community-contribution-template/deployments","created_at":"2017-04-25T12:58:00Z","updated_at":"2017-08-01T20:08:46Z","pushed_at":"2017-09-06T12:27:23Z","git_url":"git://github.com/redhat-documentation/community-contribution-template.git","ssh_url":"git@github.com:redhat-documentation/community-contribution-template.git","clone_url":"https://github.com/redhat-documentation/community-contribution-template.git","svn_url":"https://github.com/redhat-documentation/community-contribution-template","homepage":"","size":18,"stargazers_count":4,"watchers_count":4,"language":null,"has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":7,"mirror_url":null,"open_issues_count":16,"forks":7,"open_issues":16,"watchers":4,"default_branch":"master"}},"base":{"label":"redhat-documentation:master","ref":"master","sha":"c14905353f63e5894338fe6602ea8f4da925fe2c","user":{"login":"redhat-documentation","id":27931071,"avatar_url":"https://avatars1.githubusercontent.com/u/27931071?v=4","gravatar_id":"","url":"https://api.github.com/users/redhat-documentation","html_url":"https://github.com/redhat-documentation","followers_url":"https://api.github.com/users/redhat-documentation/followers","following_url":"https://api.github.com/users/redhat-documentation/following{/other_user}","gists_url":"https://api.github.com/users/redhat-documentation/gists{/gist_id}","starred_url":"https://api.github.com/users/redhat-documentation/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/redhat-documentation/subscriptions","organizations_url":"https://api.github.com/users/redhat-documentation/orgs","repos_url":"https://api.github.com/users/redhat-documentation/repos","events_url":"https://api.github.com/users/redhat-documentation/events{/privacy}","received_events_url":"https://api.github.com/users/redhat-documentation/received_events","type":"Organization","site_admin":false},"repo":{"id":89360745,"name":"community-contribution-template","full_name":"redhat-documentation/community-contribution-template","owner":{"login":"redhat-documentation","id":27931071,"avatar_url":"https://avatars1.githubusercontent.com/u/27931071?v=4","gravatar_id":"","url":"https://api.github.com/users/redhat-documentation","html_url":"https://github.com/redhat-documentation","followers_url":"https://api.github.com/users/redhat-documentation/followers","following_url":"https://api.github.com/users/redhat-documentation/following{/other_user}","gists_url":"https://api.github.com/users/redhat-documentation/gists{/gist_id}","starred_url":"https://api.github.com/users/redhat-documentation/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/redhat-documentation/subscriptions","organizations_url":"https://api.github.com/users/redhat-documentation/orgs","repos_url":"https://api.github.com/users/redhat-documentation/repos","events_url":"https://api.github.com/users/redhat-documentation/events{/privacy}","received_events_url":"https://api.github.com/users/redhat-documentation/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/redhat-documentation/community-contribution-template","description":"Provides a template for setting up or migrating to a Git repository structure where content can be easily shared between two or more remotes that each have different requirements for content and branding.","fork":false,"url":"https://api.github.com/repos/redhat-documentation/community-contribution-template","forks_url":"https://api.github.com/repos/redhat-documentation/community-contribution-template/forks","keys_url":"https://api.github.com/repos/redhat-documentation/community-contribution-template/keys{/key_id}","collaborators_url":"https://api.github.com/repos/redhat-documentation/community-contribution-template/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/redhat-documentation/community-contribution-template/teams","hooks_url":"https://api.github.com/repos/redhat-documentation/community-contribution-template/hooks","issue_events_url":"https://api.github.com/repos/redhat-documentation/community-contribution-template/issues/events{/number}","events_url":"https://api.github.com/repos/redhat-documentation/community-contribution-template/events","assignees_url":"https://api.github.com/repos/redhat-documentation/community-contribution-template/assignees{/user}","branches_url":"https://api.github.com/repos/redhat-documentation/community-contribution-template/branches{/branch}","tags_url":"https://api.github.com/repos/redhat-documentation/community-contribution-template/tags","blobs_url":"https://api.github.com/repos/redhat-documentation/community-contribution-template/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/redhat-documentation/community-contribution-template/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/redhat-documentation/community-contribution-template/git/refs{/sha}","trees_url":"https://api.github.com/repos/redhat-documentation/community-contribution-template/git/trees{/sha}","statuses_url":"https://api.github.com/repos/redhat-documentation/community-contribution-template/statuses/{sha}","languages_url":"https://api.github.com/repos/redhat-documentation/community-contribution-template/languages","stargazers_url":"https://api.github.com/repos/redhat-documentation/community-contribution-template/stargazers","contributors_url":"https://api.github.com/repos/redhat-documentation/community-contribution-template/contributors","subscribers_url":"https://api.github.com/repos/redhat-documentation/community-contribution-template/subscribers","subscription_url":"https://api.github.com/repos/redhat-documentation/community-contribution-template/subscription","commits_url":"https://api.github.com/repos/redhat-documentation/community-contribution-template/commits{/sha}","git_commits_url":"https://api.github.com/repos/redhat-documentation/community-contribution-template/git/commits{/sha}","comments_url":"https://api.github.com/repos/redhat-documentation/community-contribution-template/comments{/number}","issue_comment_url":"https://api.github.com/repos/redhat-documentation/community-contribution-template/issues/comments{/number}","contents_url":"https://api.github.com/repos/redhat-documentation/community-contribution-template/contents/{+path}","compare_url":"https://api.github.com/repos/redhat-documentation/community-contribution-template/compare/{base}...{head}","merges_url":"https://api.github.com/repos/redhat-documentation/community-contribution-template/merges","archive_url":"https://api.github.com/repos/redhat-documentation/community-contribution-template/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/redhat-documentation/community-contribution-template/downloads","issues_url":"https://api.github.com/repos/redhat-documentation/community-contribution-template/issues{/number}","pulls_url":"https://api.github.com/repos/redhat-documentation/community-contribution-template/pulls{/number}","milestones_url":"https://api.github.com/repos/redhat-documentation/community-contribution-template/milestones{/number}","notifications_url":"https://api.github.com/repos/redhat-documentation/community-contribution-template/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/redhat-documentation/community-contribution-template/labels{/name}","releases_url":"https://api.github.com/repos/redhat-documentation/community-contribution-template/releases{/id}","deployments_url":"https://api.github.com/repos/redhat-documentation/community-contribution-template/deployments","created_at":"2017-04-25T12:58:00Z","updated_at":"2017-08-01T20:08:46Z","pushed_at":"2017-09-06T12:27:23Z","git_url":"git://github.com/redhat-documentation/community-contribution-template.git","ssh_url":"git@github.com:redhat-documentation/community-contribution-template.git","clone_url":"https://github.com/redhat-documentation/community-contribution-template.git","svn_url":"https://github.com/redhat-documentation/community-contribution-template","homepage":"","size":18,"stargazers_count":4,"watchers_count":4,"language":null,"has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":7,"mirror_url":null,"open_issues_count":16,"forks":7,"open_issues":16,"watchers":4,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/redhat-documentation/community-contribution-template/pulls/23"},"html":{"href":"https://github.com/redhat-documentation/community-contribution-template/pull/23"},"issue":{"href":"https://api.github.com/repos/redhat-documentation/community-contribution-template/issues/23"},"comments":{"href":"https://api.github.com/repos/redhat-documentation/community-contribution-template/issues/23/comments"},"review_comments":{"href":"https://api.github.com/repos/redhat-documentation/community-contribution-template/pulls/23/comments"},"review_comment":{"href":"https://api.github.com/repos/redhat-documentation/community-contribution-template/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/redhat-documentation/community-contribution-template/pulls/23/commits"},"statuses":{"href":"https://api.github.com/repos/redhat-documentation/community-contribution-template/statuses/9f780365a42346e005074354a58b65bbd07b6608"}},"author_association":"NONE"}}
{"actor":{"display_login":"anjsupsri"}}