Bitbucket Integration
Promptless integrates with Bitbucket to automatically update your documentation when code changes are made. This integration allows you to connect your Bitbucket workspace and repositories, monitor pull requests for changes that might require documentation updates, and automate the documentation process.
Installation
To set up the Bitbucket integration:
- Navigate to the Integrations page in your Promptless dashboard
- Click on Connect next to the Bitbucket option
- Enter your Bitbucket credentials:
- Username: Your Bitbucket username
- App Password: A Bitbucket app password with appropriate permissions
- Workspace Name: The name of your Bitbucket workspace
To create an app password with the right permissions:
- Go to your Bitbucket account settings
- Navigate to App passwords under Access management
- Click Create app password
- Give it a descriptive name like "Promptless Integration"
- Select the following permissions:
- Repositories: Read
- Pull requests: Read and Write
- Webhooks: Read and Write
Project Setup
After connecting your Bitbucket account, you can configure how Promptless interacts with your repositories:
Repository Access
When setting up a project with Bitbucket as a trigger source:
- Select the repositories you want Promptless to monitor for changes
- Choose whether Promptless should have read-only access or write access to your documentation repositories
- Optionally, configure directory-specific triggers to focus on particular parts of your codebase
Directory-Specific Triggers
Similar to the GitHub integration, you can configure Promptless to only trigger documentation updates when changes are made to specific directories in your Bitbucket repositories. This is useful for:
- Focusing on code that directly impacts user-facing features
- Monitoring API changes that require documentation updates
- Ignoring internal tooling or test changes that don't affect documentation
To set up directory-specific triggers:
- In your project configuration, select the Bitbucket repository
- Under Advanced Options, enable Directory-Specific Triggers
- Enter the directories you want to monitor, separated by commas (e.g.,
src/api, docs/reference
)
Authentication Model
The Bitbucket integration uses a username and app password authentication model:
- Username: Your Bitbucket username for API authentication
- App Password: A secure token with specific permissions for the Promptless integration
- Workspace Access: Limited to the specific workspace you connect
This authentication model ensures that Promptless only has access to the repositories and actions you explicitly authorize.
Repository Refresh
If you add new repositories to your Bitbucket workspace after setting up the integration, you can refresh the repository list:
- Go to the Integrations page in your Promptless dashboard
- Find the Bitbucket integration
- Click the Refresh Repositories button to update the list of available repositories
Webhook Management
Promptless automatically sets up webhooks in your Bitbucket repositories to monitor for pull request events. These webhooks:
- Trigger Promptless when pull requests are created or updated
- Send only the necessary information about changes to Promptless
- Can be customized to focus on specific events
Usage
Once configured, the Bitbucket integration works similarly to the GitHub integration:
- When a pull request is opened or updated in your monitored repositories, Promptless is automatically triggered
- Promptless analyzes the changes to determine if documentation updates are needed
- If updates are needed, Promptless generates the appropriate documentation changes
- Promptless adds a comment to your Bitbucket pull request with a link to review the documentation changes
- You can review and approve the suggested documentation updates in the Promptless dashboard
For more information on how triggers work in general, see the Triggers documentation.