Skip to content

Commit

Permalink
updated readme, implemented caching for requests, improved logic for …
Browse files Browse the repository at this point in the history
…refreshAfterPush, removed not required/annoying error notifications, enhanced status bar to display the correct data for the selected repository/branch
  • Loading branch information
danielchristianschroeter committed Oct 15, 2024
1 parent 84396da commit b85a8ba
Show file tree
Hide file tree
Showing 18 changed files with 687 additions and 681 deletions.
126 changes: 80 additions & 46 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,98 +1,132 @@
# Changelog

## [2.4.0] - Current Changes

### Added

- Implemented caching for redundant requests to improve overall performance.

### Fixed

- Improved logic in the `refreshAfterPush` method to ensure the status bar reflects the latest state of the repository after a push.
- Enhanced status bar to display the correct data for the selected repository/branch.
- Removed unnecessary and annoying error notifications.

### Miscellaneous

- Updated README with new information and screenshots.
- Improved overall code structure and readability.

## [2.3.0]

### Added

- Improved branch change detection and handling in StatusBarService
- Immediate polling for build status after pushing changes
- Support for detecting and handling in-progress CI statuses
- Rate limit checking and warning for CI API requests
- Separate caching mechanisms for different repositories in CIService
- Improved branch change detection and handling in `StatusBarService`.
- Immediate polling for build status after pushing changes.
- Support for detecting and handling in-progress CI statuses.
- Rate limit checking and warning for CI API requests.
- Separate caching mechanisms for different repositories in `CIService`.

### Changed

- Enhanced error handling and logging throughout the extension
- Optimized status bar updates to reduce unnecessary refreshes
- Improved handling of repository and branch switches
- Updated GitService to emit events on repository changes
- Enhanced error handling and logging throughout the extension.
- Optimized status bar updates to reduce unnecessary refreshes.
- Improved handling of repository and branch switches.
- Updated `GitService` to emit events on repository changes.

### Improved

- More robust CI status polling with adaptive intervals
- Better caching strategy for CI build statuses
- Enhanced logging for easier debugging and troubleshooting
- Refined error messages and user feedback for CI operations
- More robust CI status polling with adaptive intervals.
- Better caching strategy for CI build statuses.
- Enhanced logging for easier debugging and troubleshooting.
- Refined error messages and user feedback for CI operations.

### Fixed

- Issues with status bar not updating correctly on branch changes
- Potential race conditions in simultaneous CI status checks
- Issues with the status bar not updating correctly on branch changes.
- Potential race conditions in simultaneous CI status checks.

## [2.2.0]

### Added

- Support for GitLab repositories with nested group structures
- Support for GitLab repositories with nested group structures.

### Fixed

- Improved URL parsing to correctly handle repositories with subgroups
- Fixed issue with extracting owner and repo from URLs containing credentials
- Enhanced compatibility with various Git remote URL formats (HTTPS, SSH, with/without credentials)
- Improved URL parsing to correctly handle repositories with subgroups.
- Fixed issue with extracting owner and repo from URLs containing credentials.
- Enhanced compatibility with various Git remote URL formats (HTTPS, SSH, with/without credentials).

### Improved

- Robustness of repository information extraction from remote URLs
- Error handling and logging for repository parsing issues
- Robustness of repository information extraction from remote URLs.
- Error handling and logging for repository parsing issues.

## [2.1.0]

### Added

- Repository-specific build status tracking
- Event emitter for repository changes in GitService
- Separate caches for each repository in CIService
- Improved tag creation and pushing process with local verification
- Repository-specific build status tracking.
- Event emitter for repository changes in `GitService`.
- Separate caches for each repository in `CIService`.
- Improved tag creation and pushing process with local verification.

### Changed

- Enhanced status bar updates to reflect current repository status
- Optimized build status polling with immediate status updates
- Improved handling of repository switches
- Enhanced status bar updates to reflect the current repository status.
- Optimized build status polling with immediate status updates.
- Improved handling of repository switches.

### Fixed

- Build status persistence across different repositories
- TypeScript errors in StatusBarService method signatures
- Error handling for tag pushing when switching repositories quickly
- Build status persistence across different repositories.
- TypeScript errors in `StatusBarService` method signatures.
- Error handling for tag pushing when switching repositories quickly.

### Improved

- Code structure and organization for better maintainability
- Performance optimizations for status bar updates and CI status checks
- Error messages and user feedback for CI status checking
- Code structure and organization for better maintainability.
- Performance optimizations for status bar updates and CI status checks.
- Error messages and user feedback for CI status checking.

## [2.0.0]

- Added: Automatic detection of CI/CD system (GitHub Actions or GitLab CI)
- Added: Support for configuring multiple CI providers simultaneously
- Changed: CI provider configuration structure in settings
- Removed: Manual CI type selection from settings
- Improved: Error handling and user feedback for tag creation and pushing
- Fixed: Issue with tag creation and pushing synchronization
- Updated: Documentation to reflect new multi-provider support and configuration
- Added: New command "Refresh Branch Build Status" for manual refresh of build status
- Improved: Error handling and feedback for build status refresh
- Updated: Documentation to include information about the new refresh command
### Added

- Automatic detection of CI/CD system (GitHub Actions or GitLab CI).
- Support for configuring multiple CI providers simultaneously.

### Changed

- CI provider configuration structure in settings.

### Removed

- Manual CI type selection from settings.

### Improved

- Error handling and user feedback for tag creation and pushing.
- Documentation to reflect new multi-provider support and configuration.
- Error handling and feedback for build status refresh.

### Fixed

- Issue with tag creation and pushing synchronization.
- Updated documentation to include information about the new refresh command.

## [1.1.0]

- Changed: Restructure and optimize code for better maintainability
### Changed

- Restructured and optimized code for better maintainability.

## [1.0.1]

- Fixed: Show unchangeable current version tag on no publishable commits
### Fixed

- Show unchangeable current version tag on no publishable commits.

## [1.0.0]

Expand Down
101 changes: 33 additions & 68 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,63 +2,44 @@

[![Visual Studio Marketplace](https://img.shields.io/visual-studio-marketplace/v/DanielChristianSchroeter.git-tag-release-tracker?style=flat&label=Visual%20Studio%20Marketplace)](https://marketplace.visualstudio.com/items?itemName=DanielChristianSchroeter.git-tag-release-tracker) [![Visual Studio Marketplace Installs](https://img.shields.io/visual-studio-marketplace/i/DanielChristianSchroeter.git-tag-release-tracker?style=flat&label=Visual%20Studio%20Marketplace%20Installs&logo=visual-studio-code)](https://marketplace.visualstudio.com/items?itemName=DanielChristianSchroeter.git-tag-release-tracker) [![OpenVSX Registry Downloads](https://img.shields.io/open-vsx/dt/DanielChristianSchroeter/git-tag-release-tracker?style=flat&label=OpenVSX%20Downloads)](https://open-vsx.org/extension/DanielChristianSchroeter/git-tag-release-tracker)

The **Git Tag Release Tracker** extension for VS Code simplifies Git tag and release management. Increment semantic versions (Major, Minor, Patch) with a single click in the status bar. Automatically tracks and displays CI/CD build status for your tags and branches.
The **Git Tag Release Tracker** extension for VS Code simplifies Git tag and release management. Increment semantic versions (Major, Minor, Patch) with a single click in the status bar. Automatically tracks and displays CI/CD build status for your tags and branches for GitHub Actions and GitLab Pipelines.

## Features

- **Automatic Detection**: Detects Git repository, branch, latest tags, and CI/CD system (GitHub Actions or GitLab Pipelines).
- **Status Bar Integration**: Shows unmerged and unreleased commits, latest tag version, and CI/CD status.
- **Tag Management**: Increase major, minor, or patch version tags from the status bar. If existing tags are present, it preserves existing prefixes and suffixes from the latest tag.
- **CI/CD Integration**: Displays build status for latest tag and current branch.
- **Automatic Detection**: Identifies Git repository, branch, latest tags, and CI/CD system (GitHub Actions or GitLab Pipelines).
- **Status Bar Integration**: Displays unmerged and unreleased commits, latest tag version, and CI/CD status.
- **Tag Management**: Increment major, minor, or patch version tags while preserving existing prefixes and suffixes.
- **CI/CD Integration**: Shows build status for the latest tag and current branch.
- **Compare Commits**: Open a GitHub/GitLab compare link to view changes between tags/branches.
- **Automatic Updates**: Status bar automatically updates build status on repository and/or branch changes, as well as after any push.
- **Automatic Updates**: Status bar updates build status on repository/branch changes and after any push.

**Note**: This extension only supports [Semantic Versioning](https://semver.org/) for tag management. Make sure your project follows the SemVer specification for optimal use of this extension.

### Default Branch vs Feature Branch Status Bar
### Default vs Feature Branch Status Bar

When you're on the default branch (e.g., main or master):
- **Default Branch**:

- You'll see buttons for creating new version tags (major, minor, patch) if existing tags exist.
- The status bar shows the number of unreleased commits since the last tag.
- Both the latest tag build status and the current branch build status are displayed.
- Buttons for creating new version tags (major, minor, patch) if tags exist.
- Shows unreleased commits since the last tag.
- Displays both latest tag and current branch build status.

When you're on any other (feature/topic) branch:

- Version tag creation buttons are hidden.
- The status bar shows both unreleased commits on the default branch and unmerged commits on your current branch.
- The current branch build status is displayed.
- **Feature Branch**:
- Hides version tag creation buttons.
- Shows unreleased commits on the default branch and unmerged commits on the current branch.
- Displays current branch build status.

### Screenshots

<p align="center">
<img src="images/default-branch-with-unreleased-commits-and-increase--minor-version.png" alt="Default Branch with Unreleased Commits" width=95%>
<br/>
<em>Default branch with unreleased commits and option to increase minor version</em>
</p>

<p align="center">
<img src="images/default-branch-creating-initial-tag.png" alt="Creating Initial Tag" width=95%>
<br/>
<em>Creating an initial version tag on the default branch</em>
</p>

<p align="center">
<img src="images/default-branch-creating-minor-tag.png" alt="Creating Minor Tag" width=95%>
<br/>
<em>Creating a minor tag on the default branch</em>
</p>

<p align="center">
<img src="images/default-branch-show-tag-build-status-result-notification.png" alt="Tag Build Status Result Notification" width=95%>
<img src="images/branch-build-status.png" alt="Branch Build Status" width=95%>
<br/>
<em>Notification showing the result of a tag build status check</em>
<em>Show your latest Github or GitLab branch build status</em>
</p>

<p align="center">
<img src="images/default-branch-show-tag-build-status.png" alt="Tag Build Status" width=95%>
<img src="images/default-branch-with-unreleased-commits-and-increase-minor-version.png" alt="Default Branch with Unreleased Commits" width=95%>
<br/>
<em>Status bar showing tag build status on the default branch</em>
<em>Default branch with unreleased commits and option to increase minor version</em>
</p>

<p align="center">
Expand All @@ -80,17 +61,13 @@ When you're on any other (feature/topic) branch:

## Extension Settings

This extension contributes the following setting:

- `gitTagReleaseTracker.ciProviders`: Configuration for different CI providers (GitHub and GitLab).
- `gitTagReleaseTracker.ciProviders`: Configure CI providers (GitHub and GitLab).

## Setting up CI/CD Status Checks

1. Generate Personal Access Tokens as per the requirements mentioned above.

2. Open your VS Code settings (File > Preferences > Settings).

3. Search for "Git Tag Release Tracker" and add the following configuration to your `settings.json`:
1. Generate Personal Access Tokens as per the requirements.
2. Open VS Code settings (File > Preferences > Settings).
3. Add the following to `settings.json`:

```json
"gitTagReleaseTracker.ciProviders": {
Expand All @@ -105,45 +82,33 @@ This extension contributes the following setting:
}
```

Replace the token placeholders with your actual tokens.

4. For self-hosted GitLab instances, update the `apiUrl` accordingly.
Replace token placeholders with actual tokens.

4. Update `apiUrl` for self-hosted GitLab instances.
5. Save your settings.

The extension will automatically detect and use the appropriate CI system for each repository.

Note: You can configure both GitHub and GitLab providers simultaneously if you work with both platforms.
The extension will detect and use the appropriate CI system for each repository.

## Commands

This extension contributes the following commands:

- `Git Tag Release Tracker: Refresh Branch Build Status`: Manually force refresh the build status for the current branch.
- `Git Tag Release Tracker: Show Logs`: Open the extension's log output channel.

You can access these commands through the Command Palette (Ctrl+Shift+P or Cmd+Shift+P on macOS) by typing "Git Tag Release Tracker".
Access these commands through the Command Palette (Ctrl+Shift+P or Cmd+Shift+P on macOS).

## Semantic Versioning

This extension adheres to Semantic Versioning 2.0.0 as defined at [semver.org](https://semver.org/). It's important to understand the principles of SemVer when using this extension:
This extension adheres to [Semantic Versioning 2.0.0](https://semver.org/). Understand the principles of SemVer:

1. MAJOR version for incompatible API changes,
2. MINOR version for adding functionality in a backwards compatible manner, and
2. MINOR version for adding functionality in a backwards compatible manner,
3. PATCH version for backwards compatible bug fixes.

Additional labels for pre-release and build metadata are available as extensions to the MAJOR.MINOR.PATCH format.

For more details on Semantic Versioning, please refer to the [official SemVer specification](https://semver.org/).

## Troubleshooting

If you encounter any issues:

1. Check the extension logs by running the "Git Tag Release Tracker: Show Logs" command.
2. Ensure your CI tokens are correctly configured in the extension settings.
3. Verify that your repository has a valid remote URL and is properly connected to GitHub or GitLab.
- Check extension logs via "Git Tag Release Tracker: Show Logs".
- Ensure CI tokens are correctly configured.
- Verify repository has a valid remote URL and is connected to GitHub or GitLab.

## Feedback and Contributions

Your feedback and contributions are welcome! Please submit issues or pull requests on the [GitHub repository](https://github.com/danielchristianschroeter/vscode-git-tag-release-tracker).
Feedback and contributions are welcome! Submit issues or pull requests on the [GitHub repository](https://github.com/danielchristianschroeter/vscode-git-tag-release-tracker).
Binary file added images/branch-build-status.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit b85a8ba

Please sign in to comment.