Managing Projects Synchronized with GitHub
You can manage and interact with GitHub-synchronized projects in API Designer and Design Center.
In the Design Center Projects list, a project’s Details pane enables you to view both GitHub sync status and repository URL, which is useful for troubleshooting connectivity issues. The Details pane also enables you to disable GitHub synchronization (you can also disable GitHub synchronization via the Publish options menu).
Use The Branch Selector Component in API Designer
Access the branch selector component by clicking the project title (with the current GitHub branch name) located at the top of the code panel.
The branch selector component enables you to access your GitHub repository page and to:
-
Select a branch
The current GitHub branch appears first (with its commit hash), followed by a list of previously created feature branches. Click a branch name to switch to branch.
-
View differences between branches
To view differences between a branch and the current branch, click View Diff.
The View in GitHub button, View Diff button, and commit hash do not appear for non-GitHub-synchronized projects. -
View the default branch
The default branch is indicated by the default icon.
-
Delete a branch
To delete a branch, click the Delete branch button (X).
-
Open a pull request
To open a pull request, switch to a branch (other than the main branch), open the branch component selector, and click Open Pull Request.
-
Rename a branch
To rename a branch, click the pencil icon, add a new name, and click Rename.
-
Create a new branch
Create a new feature branch from the current branch. Specify the new branch name in the Create Branch text field and click the create branch button (+). API Designer switches to the new branch and redirects you to the text editor. The new branch name displays above the code panel.
Use The Projects Page and Details Panel in Design Center
In Design Center, the Projects list and a project’s Details panel enable you to:
-
Determine if project is synchronized with GitHub
The Design Center Projects page lists your specifications, fragments, and applications. Projects that are synchronized with GitHub contain the GitHub icon in the Name column.
-
View the GitHub repository URL
View the GitHub repository URL in a selected project’s Detail panel. Click the Copy button to copy the URL contents into the clipboard.
-
View GitHub Synchronization status
View GitHub synchronization status in a selected project’s Details panel. The indicator displays Not Available if you have not authorized the GitHub Synchronization application in your GitHub account, or if you are not a member of a GitHub synchronized-authorized GitHub organization. In these cases, you can view the project in API Designer as read-only.
-
Change the default branch name for a new project
To change the default branch for a new project, you must have admin permissions. Open a project from the Projects Page, click Settings, and rename the branch. This applies to new projects only, not existing projects. Note that if you’re using GitHub synchronization, the default branch name is specified by GitHub.
-
Change the default branch for an existing project
To change the default branch for an existing project, open a project from the Projects Page, click Settings > Branch Settings and select a new branch. Note that if you’re using GitHub synchronization, the default branch name is specified by GitHub.
-
Disable GitHub Synchronization
To disable GitHub synchronization status from a selected project’s Details panel, click the Disable Sync button.
In the Disable GitHub Sync dialog, confirm that you want to disable sync between your project and GitHub. Enter the project name in the confirmation text field and click Disable Sync. This action cannot be undone.