Skip to content

Commit

Permalink
chore: Adds workflows for PR checks and release (#485)
Browse files Browse the repository at this point in the history
Adds checks with:
* ESLint
* Prettier
* TypeScript
* Build

Adds a manual workflow for releases
  • Loading branch information
metacurb authored Mar 31, 2024
1 parent a24e6aa commit 9a962e2
Show file tree
Hide file tree
Showing 9 changed files with 127 additions and 119 deletions.
2 changes: 1 addition & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,5 @@
"unused-imports/no-unused-imports": "error",
"no-console": "error"
},
"ignorePatterns": ["out", "dist", "**/*.d.ts"]
"ignorePatterns": ["out", "dist", "**/*.d.ts", ".github"]
}
56 changes: 30 additions & 26 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -1,36 +1,40 @@
name: Lint
name: Linting

on:
push:
branches:
- master
pull_request:
branches:
- master
push:
branches:
- master
pull_request:
branches:
- master

permissions:
checks: write
contents: write
checks: write
contents: write

jobs:
run-linters:
name: Run linters
runs-on: ubuntu-latest
run-linters:
name: Run linters
runs-on: ubuntu-latest

steps:
- name: Check out Git repository
uses: actions/checkout@v3
steps:
- name: Check out Git repository
uses: actions/checkout@v3

- name: Set up Node.js
uses: actions/setup-node@v1
with:
node-version: 20
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 20

- name: Install Node.js dependencies
run: npm ci
- name: Install Node.js dependencies
run: npm ci

- name: Run linters
uses: wearerequired/lint-action@v2
with:
eslint: true
prettier: true
- name: Run linters
uses: wearerequired/lint-action@v2
with:
eslint: true
eslint_auto_fix: true
eslint_extensions: ts
prettier: true
prettier_auto_fix: true
tsc: true
33 changes: 33 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Release

on: workflow_dispatch

permissions:
contents: read

jobs:
run-release:
name: Run release
runs-on: ubuntu-latest

steps:
- name: Check out Git repository
uses: actions/checkout@v3

- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 20

- name: Install Node.js dependencies
run: npm ci

- name: Package VS Code extension
id: package
uses: nhedger/package-vscode-extension@v1

- name: Publish to Visual Studio Marketplace
uses: HaaLeo/publish-vscode-extension@v1
with:
pat: ${{ secrets.VS_MARKETPLACE_TOKEN }}
registryUrl: https://marketplace.visualstudio.com
5 changes: 3 additions & 2 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Ignore artifacts:
.github
build
coverage
dist
out
img
img
out
64 changes: 48 additions & 16 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,52 +2,84 @@

All notable changes to the "blamer-vs" extension will be documented in this file.

## 0.6.0
## [0.6.0] - 2024-03-28

### Changed

- Major refactor & update of the codebase

### Added

- Introduces auto-blame - blame files as you open them
- Adds configuration option to disable fetching logs. Blame will still work as usual
- Fixes bug where revision is not set, blamer would fail
- Adds a toggle command - toggle between showing and clearing blame
- Appends blame to the line when clicked, a-la gitlens

## 0.5.2
### Fixed

- Fixes bug where revision is not set, blamer would fail

## [0.5.2] - 2019-12-10

### Fixed

- Fixed a bug where the commit author disappeared

## 0.5.1
## [0.5.1] - 2019-11-20

### Changed

- Handle cases where author metadata is missing
- Use spawn instead of exec
- Dependency updates

## 0.5.0
## [0.5.0] - 2019-05-30

### Added

- Mac blame shortcut added
- Setting added to toggle visual indicators

### Changed

- Better error handling, blame indicator in workbench

## 0.4.0
## [0.4.0] - 2018-08-17

### Added

- Revision number added to tooltips

## 0.3.2
## [0.3.2] - 2018-07-25

### Fixed

- Decoration issues causing characters to show incorrectly depending on the language

## [0.3.1] - 2018-06-28

### Fixed

- Formatting error in decoration caused by conflict with `mailto:`

## [0.3.0] - 2018-06-28

### Added

- Fixed decoration issue causing characters to show incorrectly depending on the language
- Linux support

## 0.3.1
## [0.2.0] - 2017-10-24

- Removed formatting error in decoration caused by conflict with `mailto:`
### Added

## 0.3.0
- Keyboard shortcut

- Linux support was added.
### Fixed

## 0.2.0
- Readme typo

- Added keyboard shortcut
- Fixed readme typo
## [0.1.0] - 2017-10-21

## 0.1.0
### Added

- Initial release
70 changes: 5 additions & 65 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
A Visual Studio Code extension to SVN blame files.
When run, this extension will place an icon next to each line of your file. Each differently-coloured icon means a different revision. Hovering a line will display a tooltip, showing the committer, date, and message. Blame data will also display inline.

https://github.com/BeauAgst/blamer-vs/assets/10343831/e1512c76-4388-490d-b67e-fc56c77e2b4b
![](/marketplace/example.gif)

## Requirements

Expand Down Expand Up @@ -40,70 +40,10 @@ This extension contributes the following commands to the Command palette.

## Known Issues

- Causes slowdown when the "**Enable Details**" setting is enabled because all unique logs have to be retrieved first. ([#3](/../../issues/3))
- Authentication errors [#5](/../../issues/5), [#9](/../../issues/9)
- Causes slowdown when the "**Enable Details**" setting is enabled because all unique logs have to be retrieved first.
- Authentication errors [#5](https://github.com/BeauAgst/svn-blamer/issues/5)

## Feedback & Contributing

Please report any bugs, suggestions or documentation requests via [issues](/../../issues)
Feel free to submit [pull requests](/../../pulls)

## TODO

- Automate release flow
- Tests pass
- https://github.com/marketplace/actions/gh-release
- https://github.com/marketplace/actions/vsix-publisher

## Release Notes

## 0.6.0

- Major refactor & update of the codebase
- Introduces auto-blame - blame files as you open them
- Adds configuration option to disable fetching logs. Blame will still work as usual [#77](/../../issues/77) [#471](/../../issues/471)
- Fixes bug where revision is not set, blamer would fail [#470](/../../issues/470)
- Adds a toggle command - toggle between showing and clearing blame [#71](/../../issues/71) [#88](/../../issues/88)
- Appends blame to the line when clicked, a-la gitlens [#327](/../../issues/327)

## 0.5.2

- Fixed a bug where the commit author disappeared

## 0.5.1

- Handle cases where author metadata is missing [#53](/../../issues/53)
- Use spawn instead of exec [#53](/../../issues/53)
- Dependency updates

## 0.5.0

- Mac blame shortcut added
- Setting added to toggle visual indicator visibility [#10](/../../issues/10)
- Better error handling, blame indicator in workbench [#3](/../../issues/3)

## 0.4.0

- Revision number added to tooltips [#7](/../../issues/7)

## 0.3.2

- Fixed decoration issue causing characters to show incorrectly depending on the language [#6](/../../issues/6)

## 0.3.1

- Removed formatting error in decoration caused by conflict with `mailto:`
- Added icon to extension

## 0.3.0

- Linux support was added. [#2](/../../issues/2)

## 0.2.0

- Added keyboard shortcut
- Fixed readme typo

## 0.1.0

- Initial release
Please report any bugs, suggestions or documentation requests via [issues](https://github.com/BeauAgst/svn-blamer/issues)
Feel free to submit [pull requests](https://github.com/BeauAgst/svn-blamer/pulls)
2 changes: 1 addition & 1 deletion esbuild.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ let ctx = await esbuild.context({
entryPoints: ["./src/extension.ts"],
external: ["vscode"],
format: "cjs",
logLevel: "info",
logLevel: "debug",
minify: process.argv.includes("--minify"),
outfile: "./dist/extension.js",
platform: "node",
Expand Down
Binary file added marketplace/example.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 6 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"url": "https://github.com/BeauAgst/blamer-vs/issues"
},
"homepage": "https://github.com/BeauAgst/blamer-vs",
"icon": "./dist/public/icon.png",
"icon": "dist/public/icon.png",
"engines": {
"vscode": "^1.87.0"
},
Expand Down Expand Up @@ -78,13 +78,11 @@
"scripts": {
"compile-tests": "tsc -p . --outDir out",
"esbuild": "node ./esbuild.config.mjs",
"eslint": "eslint src --ext ts",
"eslint:fix": "eslint src --ext ts --fix",
"lint": "npm run eslint && npm run prettier",
"package": "webpack --mode production --devtool hidden-source-map",
"format": "prettier --write --ignore-unknown .",
"lint:fix": "npm run lint -- --fix",
"lint": "eslint src --ext ts",
"prepare": "husky",
"pretest": "npm run compile-tests && npm run compile && npm run lint",
"prettier": "prettier --write --ignore-unknown .",
"test": "vscode-test",
"vscode:prepublish": "npm run esbuild -- --minify",
"watch-tests": "tsc -p . -w --outDir out",
Expand Down Expand Up @@ -118,8 +116,8 @@
},
"lint-staged": {
"**/*.{js,ts}": [
"prettier --write --ignore-unknown",
"eslint src --ext ts --fix"
"eslint src --ext ts --fix",
"prettier --cache --write --ignore-unknown"
]
}
}

0 comments on commit 9a962e2

Please sign in to comment.