Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
39 changes: 39 additions & 0 deletions .github/ISSUE_TEMPLATE/🐞-bug-report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
---
name: "\U0001F41E Bug Report"
about: Report an issue or bug with the project
title: "\U0001F41E (fix): <add description>"
labels: ""
assignees: ""
---

## 🐞 Bug Description

<!--A clear and concise description of what the bug is.-->

### 🔍 Steps to Reproduce

Steps to reproduce the behavior:

1. Go to '...'
2. Click on '...'
3. Scroll down to '...'
4. See error

### 🤔 Expected Behavior

<!--What you expected to happen instead of the issue.-->

### 📷 Screenshots or Logs

<!--If applicable, add screenshots or logs to help explain the issue.-->

### 🌐 Environment

- **OS**: (e.g., macOS, Windows, Linux)
- **Browser**: (e.g., Chrome, Firefox, Safari)
- **Backstage Version**: (if applicable)
- **Node Version**: (e.g., 14.x, 16.x)

### 📋 Additional Context

<!--Any other context about the problem here. Can you think of potential solutions or workarounds?-->
23 changes: 23 additions & 0 deletions .github/ISSUE_TEMPLATE/🚀-feature-request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
name: "\U0001F680 Feature request"
about: Suggest a new feature or enhancement for the project
title: "\U0001F680 (feat): <add description>"
labels: enhancement
assignees: ""
---

## ✨ Feature Description

<!--Clearly and concisely describe the feature or enhancement you'd like to see.-->

### 🎯 Why do we need this feature?

<!--Explain why this feature is important or how it benefits the project.-->

### 📋 Additional Context

<!--Is there any other information, mockups, or ideas that would help us better understand this request? If so, please provide them here.-->

### 🤔 Alternatives

<!--If applicable, mention any alternative solutions or features you've considered.-->
93 changes: 93 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
name: Build
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
lint:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [20.x, 22.x]
steps:
- uses: actions/checkout@v3
- name: Install Ubuntu dependencies
run: |
sudo apt-get update && sudo apt-get install -y \
libkrb5-dev
- name: Setup Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: "yarn"
- run: yarn install
- run: yarn lint

test:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [20.x, 22.x]
steps:
- uses: actions/checkout@v3
- name: Install Ubuntu dependencies
run: |
sudo apt-get update && sudo apt-get install -y \
libkrb5-dev
- name: Setup Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: "yarn"
- run: yarn install
- run: yarn test
- name: Upload results to Codecov
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}

build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [20.x, 22.x]
steps:
- uses: actions/checkout@v3
- name: Install Ubuntu dependencies
run: |
sudo apt-get update && sudo apt-get install -y \
libkrb5-dev
- name: Setup Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: "yarn"
- run: yarn install
- run: yarn build

release-dry-run:
runs-on: ubuntu-latest
needs: [lint, test]
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Install Ubuntu dependencies
run: |
sudo apt-get update && sudo apt-get install -y \
libkrb5-dev
- name: Setup Node.js 20.x
uses: actions/setup-node@v3
with:
node-version: 20.x
cache: "yarn"
- run: yarn install
- run: yarn build
- run: yarn semantic-release --dry-run
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
31 changes: 31 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Release
on:
workflow_dispatch:

jobs:
release:
runs-on: ubuntu-latest
permissions:
contents: write
issues: write
pull-requests: write
id-token: write
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Install Ubuntu dependencies
run: |
sudo apt-get update && sudo apt-get install -y \
libkrb5-dev
- name: Setup Node.js 20.x
uses: actions/setup-node@v3
with:
node-version: 20.x
cache: "yarn"
- run: yarn install
- run: yarn build
- run: yarn semantic-release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
1 change: 1 addition & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*.tsbuildinfo
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# codeowners

A way to manage CODEOWNERS files programatically.
A way to manage CODEOWNERS files programmatically.

## Packages

- `@bckr/codeowners` - A TypeScript library for parsing and composing CODEOWNERS files. [View documentation](./packages/codeowners/README.md)
- `@bbckr/codeowners` - A TypeScript library for parsing and composing CODEOWNERS files, [view documentation.](./packages/codeowners/README.md)
5 changes: 4 additions & 1 deletion babel.config.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
module.exports = {
/** @type {import('@babel/core').TransformOptions} */
const config = {
presets: [["@babel/preset-env", { targets: { node: "current" } }]],
};

export default config;
6 changes: 2 additions & 4 deletions lerna.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,8 @@
"version": "independent",
"npmClient": "yarn",
"command": {
"publish": {
"conventionalCommits": true,
"message": "chore(release): publish",
"registry": "https://registry.npmjs.org/"
"version": {
"conventionalCommits": true
}
}
}
7 changes: 4 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "root",
"version": "1.0.0",
"version": "0.0.0-semantically-released",
"description": "A way to manage CODEOWNERS files programatically.",
"author": "bri becker <bri@bckr.io>",
"license": "MIT",
Expand All @@ -11,15 +11,16 @@
"scripts": {
"build": "lerna run build --no-private",
"test": "lerna run test",
"clean": "lerna run clean",
"lint": "eslint . && prettier --check .",
"format": "eslint . --fix && prettier --write .",
"prepare": "yarn build",
"publish-packages": "lerna publish"
"semantic-release": "lerna run semantic-release"
},
"devDependencies": {
"@babel/core": "^7.25.2",
"@babel/preset-env": "^7.25.4",
"@eslint/js": "^9.10.0",
"@semantic-release/changelog": "^6.0.3",
"@types/eslint__js": "^8.42.3",
"@types/jest": "^29.5.13",
"@types/node": "^22.5.5",
Expand Down
10 changes: 10 additions & 0 deletions packages/codeowners/.releaserc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"branches": ["main"],
"plugins": [
"@semantic-release/commit-analyzer",
"@semantic-release/release-notes-generator",
"@semantic-release/changelog",
["@semantic-release/npm", { "npmPublish": true, "tarballDir": "./dist" }],
"@semantic-release/github"
]
}
Loading
Loading