You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/segment-app/extensions/git.md
+24-3
Original file line number
Diff line number
Diff line change
@@ -86,21 +86,42 @@ For more information on using Terraform, visit [Terraform's documentation](https
86
86
87
87
## Bidirectional Sync
88
88
89
-
Bidirectional sync builds on top of the Git Sync extension and lets you manage your Segment workspace directly in GitHub. After you configure and enable bidirectional sync, Segment automatically listens for pull requests in your repository and manages all related workspace changes. Segment will not apply any changes unless the pull request is s[ecigfied pull request has met all mere requirements and the pull request is able to be merged.
89
+
Bidirectional sync builds on top of the Git Sync extension and lets you manage your Segment workspace directly in GitHub. After you configure and enable bidirectional sync, Segment automatically listens for pull requests in your repository and manages all related workspace changes. Segment will not apply any changes unless the pull request has met all merge requirements and can be merged.
- [Segment resources compatible with Git sync](#working-with-git-sync)
94
+
95
+
Bidirectional sync does not support variables, references to other resources, or resources from other providers.
90
96
91
97
> warning "Bidirectional sync can lead to broad workspace changes, including data loss"
92
98
> When using bidirectional sync to manage your Segment resources, verify that your specified plan matches the changes you expected. Unexpected changes can include data loss.
93
99
94
100
### Set up bidirectional sync
95
101
96
102
To set up bidirectional sync in your workspace:
103
+
97
104
1. **Navigate to the Git Sync settings page to verify that your Git Sync integration is set up with Segment's GitHub App integration.** If it isn't, you can change the connection type under **Settings > Extensions > Git Sync > Manage Configuration**. If you were previously using the GitHub App integration, you might need to accept additional GitHub permissions that allow Segment t0 o listen for the relevant events.
98
105
2. **Add branch protection to your GitHub repository**. You can update your branch protections by opening GitHub and navigating to **Settings > Rules > Rulesets** and adding the Segment Extensions app to the **Bypass list**.
99
-
3. **Navigate to the Segment app and enable Git sync bidirectional sync.** From thje Segment app, navigate to **Settings > Edxtentions > Git Sync** page and enabling the **Git sync bidirectional sync** setting.
106
+
3. **Navigate to the Segment app and enable Git sync bidirectional sync.** From the Segment app, navigate to **Settings > Extentions > Git Sync** page and enabling the **Git sync bidirectional sync** setting.
100
107
101
108
### Use bidirectional sync
102
109
103
-
1. Create a branch off of the branch specified in your Git Sync configuration, make the changes you'd like to see in your workspace, and submit a pull request with
110
+
To apply changes to your workspace using bidirectional sync:
111
+
112
+
1. Create a branch off of the branch specified in your Git Sync configuration, make the changes you'd like to see in your workspace, then submit a pull request with your changes.
113
+
- To add a new resource, add a *new* configuration file to the corresponding resource directory. Segment does not support multiple resources within the same file. The name does not matter, as it will be overwritten with a new ID after Segment creates the resource.
114
+
2. Segment calculates the changes required to reflect those changes and outputs the planned changes to a comment directly on the pull request.
115
+
3. Carefully double check that the planned changes match your desired changes and request approval from any stakeholders required before merging the pull request.
116
+
4. Run `segment apply` to apply the planned changes.
117
+
118
+
#### Use secrets with bidirectional sync
119
+
120
+
To use secrets in your bidirectional sync workflow:
121
+
122
+
1. Navigate to **Settings > Extensions > Git Sync > Manage Configuration** and upload your secret to the **Secrets** table.
123
+
2. When referencing your secret, use `@@<secret_name>@@` in place of your secret, wherever applicable. Secrets are automatically hidden in a bidirectional sync output, but if you are not using them in a designated secret field, like Source/Destination key settings, for example, they might be written in plaintext to the repository as part of the regular syncing process.
0 commit comments