Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
dea4078
fix(coverage): update node version installation step, update coverage…
Jamie-BitFlight Nov 20, 2023
07d845c
ci(linter): update linter in ci
Jamie-BitFlight Nov 20, 2023
e9d3e5c
ci(linter): update linter in ci
Jamie-BitFlight Nov 20, 2023
0c688ad
ci(setup-node): update setup-node
Jamie-BitFlight Nov 20, 2023
756d740
ci(setup-node): update setup-node
Jamie-BitFlight Nov 20, 2023
7ada5c8
ci(setup-node): update setup-node
Jamie-BitFlight Nov 20, 2023
7b1545f
ci(setup-node): update setup-node
Jamie-BitFlight Nov 20, 2023
a34159c
ci(setup-node): update setup-node
Jamie-BitFlight Nov 20, 2023
75e9480
ci(commented): remove commented out code
Jamie-BitFlight Nov 20, 2023
ff2cc62
ci(engines.node): update engines range for node
Jamie-BitFlight Nov 20, 2023
b971069
ci(lint): fix false positive on markdown lint
Jamie-BitFlight Nov 20, 2023
37687bf
ci(lint): fix false positive on markdown lint
Jamie-BitFlight Nov 20, 2023
adc14fd
ci(lint): debug coverage
Jamie-BitFlight Nov 20, 2023
24a0ed2
Merge branch 'main' into feat/update-node-engines-version
Jamie-BitFlight Nov 20, 2023
44e6aa0
ci(tests): debug permissions
Jamie-BitFlight Nov 20, 2023
9f58e14
ci(tests): debug permissions
Jamie-BitFlight Nov 20, 2023
1bcbf5b
ci(tests): debug permissions
Jamie-BitFlight Nov 20, 2023
a31cfa0
Merge branch 'main' into feat/update-node-engines-version
Jamie-BitFlight Nov 20, 2023
00990d3
ci(tests): debug permissions
Jamie-BitFlight Nov 20, 2023
eec9bb6
ci(tests): debug permissions
Jamie-BitFlight Nov 20, 2023
ba990d9
ci(tests): fixup package.json
Jamie-BitFlight Nov 20, 2023
e52e4d5
Merge branch 'main' into feat/update-node-engines-version
Jamie-BitFlight Nov 20, 2023
02c2d86
ci(tests): remove unneeded step
Jamie-BitFlight Nov 20, 2023
9071f5b
Merge branch 'feat/update-node-engines-version' of github.com:bitflig…
Jamie-BitFlight Nov 20, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 19 additions & 11 deletions .github/workflows/push_code_linting.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,20 @@
name: Code Linting Annotation
on: [pull_request]
on:
pull_request:
branches:
- main
- next
- beta
- "*.x"
push:
branches:
- main
- next
- beta
- "*.x"

concurrency:
group: ci-${{ github.event.pull_request.number || github.ref }}
group: ci-linting-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
eslint_annotation:
Expand All @@ -21,15 +34,10 @@ jobs:
steps:
- uses: actions/checkout@v4.1.1

- id: get-node-version
run: |
NODE_VERSION=$(grep -oP '^node-version\s*=\s*\K.*' .npmrc | cut -d '.' -f 1-3)
echo "node-version=${NODE_VERSION}" >> "$GITHUB_OUTPUT"

- uses: actions/setup-node@v4
with:
node-version: ${{ steps.get-node-version.outputs.node-version }}
cache: "npm"
- name: Install compatible Nodejs version
id: setup-node
uses: ./.github/actions/setup-node

- name: Install Deps
run: npm install
- uses: xt0rted/markdownlint-problem-matcher@v2
Expand Down
9 changes: 3 additions & 6 deletions .github/workflows/release_action.yml.disabled
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,9 @@ jobs:
ref: ${{ github.ref }}
- name: Prepare repository
run: git fetch --unshallow --tags
- uses: actions/setup-node@v4
with:
node-version: '16.x'
registry-url: 'https://registry.npmjs.org'
always-auth: true
cache: npm
- name: Install compatible Nodejs version
id: setup-node
uses: ./.github/actions/setup-node
- run: git config --global init.defaultBranch main
- name: Get yarn cache directory path
id: yarn-cache-dir-path
Expand Down
7 changes: 0 additions & 7 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,6 @@ jobs:
echo "$HOME/.local/bin" >> "${GITHUB_PATH}"
echo "HOME=$HOME" >> "${GITHUB_ENV}"

- name: Configure Git
run: |
git config --global user.email "${{ github.event.pusher.email || 'stack@bitflight.io' }}"
git config --global user.name "${{ github.event.pusher.name || 'GitHub[bot]' }}"
git fetch --tags
git status --porcelain -u

- run: npm install
- run: npm run test
- run: npm run coverage
Expand Down
1 change: 0 additions & 1 deletion .markdownlint.json
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,6 @@
"MD043": false,
// MD044/proper-names - Proper names should have the correct capitalization
"MD044": {
"names": ["JavaScript", "TypeScript", "TSLint", "ESLint"],
"code_blocks": false
},
// MD045/no-alt-text - Images should have alternate text (alt text)
Expand Down
1 change: 0 additions & 1 deletion .ncurc.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
upgrade: true
reject: ["chalk"]
1 change: 1 addition & 0 deletions .node-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
20.x
2 changes: 0 additions & 2 deletions .npmrc
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,4 @@ bitflight-devops:registry=https://registry.npmjs.org/
# always-auth=true
merge-git-branch-lockfiles-branch-pattern[]=main
merge-git-branch-lockfiles-branch-pattern[]=release*
use-node-version=20.7.0
node-version=20.7.0
progress=false
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -221,5 +221,8 @@ You can modify the script below to include any extra variables you like or use n
| <code>readme_after</code> | The content of the readme file after the changes were made |

<!-- end outputs -->

**NOTE**: [volta.sh](https://volta.sh/) is a great tool for managing node versions, and is configured in this directory. If you have volta installed, you can run `volta install` to install the correct version of node for this project.

<!-- start [.github/ghadocs/examples/] -->
<!-- end [.github/ghadocs/examples/] -->
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 12 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
},
"repository": {
"type": "git",
"url": "https://github.com/bitflight-devops/github-action-readme-generator"
"url": "git+https://github.com/bitflight-devops/github-action-readme-generator.git"
},
"license": "APACHE",
"author": "Jamie Nelson <jamie@bitflight.io>",
Expand All @@ -30,13 +30,15 @@
"main": "dist/cjs/index.js",
"module": "dist/mjs/index.js",
"types": "dist/types/index.d.ts",
"bin": "dist/bin/index.js",
"bin": {
"github-action-readme-generator": "dist/bin/index.js"
},
"files": [
"package.json",
"README.md",
"LICENSE",
"CHANGELOG.md",
"/dist"
"dist/"
],
"scripts": {
"all": "npm run build && npm run format && npm run lint && npm run test",
Expand Down Expand Up @@ -93,8 +95,8 @@
},
"lint-staged": {
"*.{md,json,yaml,yml,sh}": "prettier --write",
"{src,__tests__}/**/*.js": "eslint --cache --fix",
"*.{ts,mts,yml}": [
"{src,__tests__}/**/*.ts": "eslint --cache --fix",
"*.{yaml,yml}": [
"eslint --cache --fix"
]
},
Expand Down Expand Up @@ -209,13 +211,17 @@
"vitest": "^0.34.6"
},
"engines": {
"node": ">= 18"
"node": ">=20.0.0 <21.0.0",
"npm": ">=10.0.0"
},
"os": [
"!win32"
],
"publishConfig": {
"access": "public",
"registry": "https://registry.npmjs.org/"
},
"volta": {
"node": "20.9.0"
}
}
2 changes: 0 additions & 2 deletions src/inputs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ import { configFileName, ConfigKeys, README_SECTIONS, ReadmeSection } from './co
import { repositoryFinder } from './helpers.js';
import LogTask from './logtask/index.js';
import ReadmeEditor from './readme-editor.js';
// import workingDirectory from './working-directory.js';

/**
* Get the filename from the import.meta.url
Expand Down Expand Up @@ -301,7 +300,6 @@ export function transformGitHubInputsToArgv(
const key = ConfigKeysInputsMap[keyParsed] || keyParsed;
// eslint-disable-next-line no-param-reassign
obj.key = key;
// TODO: This is a hack to get around the fact that nconf doesn't support just returning the new value like its documentation says.
config.set(key, obj.value);

log.debug(`New input is ${key} with the value ${obj.value}`);
Expand Down
2 changes: 1 addition & 1 deletion src/readme-generator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* If an error occurs during the update of a section, it logs the error message and stops the process.
* Finally, it saves the updated README.md file and calls the 'save' function.
*/
// TODO: Ask CodeWhisperer to write unit tests.

import * as core from '@actions/core';

import { ReadmeSection } from './constants.js';
Expand Down