Skip to content

Commit

Permalink
chore: set up initial version
Browse files Browse the repository at this point in the history
  • Loading branch information
saikumarrs committed Nov 8, 2022
1 parent 4cc2eeb commit 29e351e
Show file tree
Hide file tree
Showing 60 changed files with 19,414 additions and 5,516 deletions.
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
build
16 changes: 16 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"env": {
"browser": true,
"es2021": true
},
"plugins": ["prettier", "unused-imports"],
"extends": ["airbnb-base", "plugin:prettier/recommended"],
"parser": "@babel/eslint-parser",
"overrides": [],
"parserOptions": {
"requireConfigFile": false,
"ecmaVersion": 11,
"sourceType": "module"
},
"rules": {}
}
26 changes: 26 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
---
name: Bug report
about: Create a report to help us improve
title: "[ISSUE]"
labels: bug
assignees: ''

---

**Describe the issue**
Enter a clear and concise description of what the bug/issue is.

**To Reproduce**
Mention the steps to reproduce the behavior that causes the bug/issue:

**Expected behavior**
A clear and concise description of what you expected to happen.

**Screenshots**
If applicable, add screenshots to help explain your problem.

**Required information (please complete the following information):**
- Package version: [e.g., v0.1.1]

**Additional context**
Add any other context about the problem here.
20 changes: 20 additions & 0 deletions .github/ISSUE_TEMPLATE/feature-request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
name: Feature Request
about: Suggest an idea for this project
title: "[ENHANCEMENT]"
labels: enhancement
assignees: ''

---

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

**Describe the solution you'd like**
A clear and concise description of what you want to happen.

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.

**Additional context**
Add any other context or screenshots about the feature request here.
20 changes: 20 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
## Description of the change

< Description >

## Checklists

### Development

- [ ] My code follows the style guidelines of this project
- [ ] I have performed a self-review of my own code
- [ ] I have commented my code, particularly in hard-to-understand areas
- [ ] I have made corresponding changes to the documentation
- [ ] The code changed/added as part of this pull request has been covered with tests
- [ ] All tests related to the changed code pass in development

### Code review

- [ ] This pull request has a descriptive title and information useful to a reviewer. There may be a screenshot or screencast attached
- [ ] Changes have been reviewed by at least one other engineer
- [ ] Issue from task tracker has a link to this pull request
12 changes: 12 additions & 0 deletions .github/workflows/codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# https://github.com/marketplace/actions/jest-coverage-report
name: 'coverage'
on:
pull_request:
branches:
- "*"
jobs:
coverage:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: ArtiomTr/jest-coverage-report-action@v2
39 changes: 39 additions & 0 deletions .github/workflows/housekeeping.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Handle stale PRs

on:
schedule:
- cron: '42 1 * * *'

jobs:
prs:
name: Clean up stale PRs
runs-on: ubuntu-latest

permissions:
pull-requests: write

steps:
- uses: actions/stale@v5
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
operations-per-run: 200
stale-pr-message: 'This PR is considered to be stale. It has been open 20 days with no further activity thus it is going to be closed in 7 days. To avoid such a case please consider removing the stale label manually or add a comment to the PR.'
days-before-pr-stale: 20
days-before-pr-close: 7
stale-pr-label: 'Stale'

branches:
name: Cleanup old branches
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Run delete-old-branches-action
uses: beatlabs/[email protected]
with:
repo_token: ${{ github.token }}
date: '6 months ago'
dry_run: false
delete_tags: false
extra_protected_branch_regex: ^(main|master|release.*|rudder-saas)$
exclude_open_pr_branches: true
16 changes: 16 additions & 0 deletions .github/workflows/pr-description-enforcer.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: 'Pull Request Description'
on:
pull_request:
types:
- opened
- edited
- reopened

jobs:
enforce:
runs-on: ubuntu-latest

steps:
- uses: rudderlabs/[email protected]
with:
repo-token: '${{ secrets.GITHUB_TOKEN }}'
44 changes: 44 additions & 0 deletions .github/workflows/release-please.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
on:
push:
branches:
- "main"
- "release/*"
name: release-please
jobs:
release-please:
runs-on: ubuntu-latest
steps:
- name: Extract branch name
shell: bash
run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})"
id: extract_branch
- uses: google-github-actions/release-please-action@v3
id: release
with:
token: ${{ github.token }}
pull-request-title-pattern: "chore: release ${version}"
release-type: node
package-name: rudder-json-template-engine
default-branch: ${{ steps.extract_branch.outputs.branch }}
changelog-types: '[{"type":"feat","section":"Features","hidden":false},{"type":"fix","section":"Bug Fixes","hidden":false},{"type":"chore","section":"Miscellaneous","hidden":false},{"type":"refactor","section":"Miscellaneous","hidden":false},{"type":"test","section":"Miscellaneous","hidden":false},{"type":"doc","section":"Documentation","hidden":false}]'
bump-minor-pre-major: true
bump-patch-for-minor-pre-major: true
# The logic below handles the npm publication:
- uses: actions/checkout@v2
# these if statements ensure that a publication only occurs when
# a new release is created:
if: ${{ steps.release.outputs.release_created }}
- uses: actions/setup-node@v2
with:
node-version: 14
if: ${{ steps.release.outputs.release_created }}
- run: npm ci
if: ${{ steps.release.outputs.release_created }}
- run: npm run build
if: ${{ steps.release.outputs.release_created }}
- run: npm set //registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}
if: ${{ steps.release.outputs.release_created }}
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
if: ${{ steps.release.outputs.release_created }}
59 changes: 59 additions & 0 deletions .github/workflows/semantic-pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: "Semantic pull requests"

on:
pull_request:
types:
- opened
- edited
- labeled
- unlabeled
- converted_to_draft
- ready_for_review
- synchronize

jobs:
main:
name: Validate PR title
runs-on: ubuntu-latest
steps:
-
uses: amannn/action-semantic-pull-request@v4
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
types: |
fix
feat
chore
refactor
exp
doc
test
requireScope: false
subjectPattern: ^(?![A-Z]).+$
subjectPatternError: |
The subject "{subject}" found in the pull request title "{title}"
didn't match the configured pattern. Please ensure that the subject
doesn't start with an uppercase character.
# For work-in-progress PRs you can typically use draft pull requests
# from GitHub. However, private repositories on the free plan don't have
# this option and therefore this action allows you to opt-in to using the
# special "[WIP]" prefix to indicate this state. This will avoid the
# validation of the PR title and the pull request checks remain pending.
# Note that a second check will be reported if this is enabled.
wip: true
# When using "Squash and merge" on a PR with only one commit, GitHub
# will suggest using that commit message instead of the PR title for the
# merge commit, and it's easy to commit this by mistake. Enable this option
# to also validate the commit message for one commit PRs.
validateSingleCommit: true
# Related to `validateSingleCommit` you can opt-in to validate that the PR
# title matches a single commit to avoid confusion.
validateSingleCommitMatchesPrTitle: true
# If the PR contains one of these labels, the validation is skipped.
# Multiple labels can be separated by newlines.
# If you want to rerun the validation when labels change, you might want
# to use the `labeled` and `unlabeled` event triggers in your workflow.
ignoreLabels: |
bot
dependencies
22 changes: 22 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: tests

on: pull_request

jobs:
install-and-test:
name: install and test
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@master

- name: Setup node
uses: actions/setup-node@v2
with:
node-version: 14

- name: Install dependencies
run: npm ci

- name: Run tests
run: npm run test
Loading

0 comments on commit 29e351e

Please sign in to comment.