Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: develop merge #134

Closed
wants to merge 21 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
a6c9c9b
refactor: PRSDM-5464 setup semantic release (#127)
Zalaras Jul 19, 2024
bfae13f
ci: add admin token for actions to push to protected branch
Zalaras Jul 19, 2024
93cb76b
ci: fix github action permissions 1
Zalaras Jul 22, 2024
31c3700
ci: add PAT token to repo scope
Zalaras Jul 22, 2024
b4cc126
ci: fix PAT access
Zalaras Jul 22, 2024
07b7622
ci: drop permissions since using PAT
Zalaras Jul 22, 2024
f6eb0e1
ci: correct PAT to secrets
Zalaras Jul 22, 2024
14057f9
ci: add persist-credentials to stop using default gh token
Zalaras Jul 22, 2024
df67e1e
chore(release): 0.5.6-rfv.1 [skip ci]
semantic-release-bot Jul 22, 2024
976332e
chore: merge main
Zalaras Jul 22, 2024
80c391f
chore: update package-lock
Zalaras Jul 22, 2024
2f43b10
chore(release): 2.13.2-rfv.1 [skip ci]
semantic-release-bot Jul 22, 2024
c2834eb
ci: update semantic-release-github asset upload name
Zalaras Jul 22, 2024
1852144
refactor: test publich new release with zip
Zalaras Jul 22, 2024
363d482
chore(release): 2.13.2-rfv.2 [skip ci]
semantic-release-bot Jul 22, 2024
7da45b3
fix: release zip 1
Zalaras Jul 22, 2024
4aa17e6
chore(release): 2.13.2-rfv.3 [skip ci]
semantic-release-bot Jul 22, 2024
245e0ac
fix: Change sidenav to highlight first and not last item if content s…
CharlRitterDev Jul 25, 2024
17b2c14
chore(release): 2.13.2-rfv.4 [skip ci]
semantic-release-bot Jul 25, 2024
02cc7aa
ci: cleanup semantic release (#131)
Zalaras Aug 8, 2024
d6a736e
ci: remove comments on successful release (#133)
Zalaras Nov 14, 2024
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
17 changes: 17 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
## Description

## Issue
- [ ] :clipboard: JIRA_TICKET_URL

## Screenshots

## PR Readiness Checks
- [ ] Your PR title conforms to conventional commits `<type>: <jira-ticket-num><title>`, for example: `fix: PRSDM-123 issue with login` with a maximum of 100 characters
- [ ] You have performed a self-review of your changes via the GitHub UI
- [ ] Comments were added to new code that can not explain itself (see [reference 1](https://bpoplauschi.github.io/2021/01/20/Clean-Code-Comments-by-Uncle-Bob-part-2.html) and [reference 2](https://blog.cleancoder.com/uncle-bob/2017/02/23/NecessaryComments.html))
- [ ] New code adheres to the following quality standards:
- Function Length ([see reference](https://martinfowler.com/bliki/FunctionLength.html))
- Meaningful Names ([see reference](https://learning.oreilly.com/library/view/clean-code-a/9780136083238/chapter02.xhtml))
- DRY ([see reference](https://java-design-patterns.com/principles/#keep-things-dry))
- YAGNI ([see reference](https://java-design-patterns.com/principles/#yagni))
- [ ] Tests were added to prove the correctness and ensure extendability of the functionality added (unless agreed upon by the reviewers that it's not necessary) and the changes were tested locally
33 changes: 33 additions & 0 deletions .github/workflows/build-and-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: build-and-release
on:
push:
branches:
- develop
- main
jobs:
build-and-release:
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v4
with:
persist-credentials: false # to disable default GITHUB_TOKEN

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 'lts/*'
cache: npm

- name: Install Dependencies
run: npm ci

- name: Build Project
run: npm run build

- name: Semantic Release
env:
GITHUB_TOKEN: ${{ secrets.PAT }}
BRANCH_NAME: ${{ github.ref_name }}
run: npx semantic-release

21 changes: 21 additions & 0 deletions .github/workflows/lint-pr-title.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: "Lint PR Title"

on:
pull_request:
types:
- opened
- reopened
- edited
- synchronize
permissions:
pull-requests: read
contents: read
packages: read
jobs:
main:
name: Validate PR title
runs-on: ubuntu-latest
steps:
- uses: amannn/action-semantic-pull-request@v5
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
13 changes: 0 additions & 13 deletions .github/workflows/release-please.yml

This file was deleted.

45 changes: 45 additions & 0 deletions .releaserc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
{
"branches": ["main", { "name": "develop", "prerelease": "rfv" }, "+([0-9])?(.{+([0-9]),x}).x"],
"plugins": [
["@semantic-release/commit-analyzer",
{
"releaseRules": [
{
"type": "refactor",
"release": "patch"
}
]
}
],
["@semantic-release/release-notes-generator",
{
"presetConfig": {
"types": [
{
"type": "refactor",
"section": "Refactors",
"hidden": false
}
]
}
}
],
["@semantic-release/exec",
{
"prepareCmd": "zip -r -qq presidium-js dist"
}
],
["@semantic-release/github",
{
"assets": [
{
"path": "presidium-js.zip",
"name":"${nextRelease.gitTag}.zip",
"label": "${nextRelease.gitTag}.zip"
}
],
"successComment": false
}
]
]
}
29 changes: 0 additions & 29 deletions .travis.yml

This file was deleted.

6 changes: 5 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,8 @@

## 2024-01-10
### Updates
- Added the Github team as the code owners @CharlRitterDev https://spandigital.atlassian.net/browse/PRSDM-4891
- Added the Github team as the code owners. @CharlRitterDev https://spandigital.atlassian.net/browse/PRSDM-4891
-
## 2024-07-24
### Updates
- Change sidenav to highlight first and not last item if content smaller than screensize. @CharlRitterDev
18 changes: 0 additions & 18 deletions GitVersion.yml

This file was deleted.

5 changes: 5 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
commitlint:
npm install
npm install -g commitizen
mkdir .husky
echo "npx --no -- commitlint --edit \$$1" > .husky/commit-msg
79 changes: 79 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,82 @@ $ npm run start
```bash
$ mocha --compilers js:babel-core/register --recursive test/
```

---

## Conventional Commits

At SPAN we use [Conventional Commits 1.0.0](https://www.conventionalcommits.org/en/v1.0.0/) to make our commit messages more useful.

### Installation

To install the dependencies for the conventional commits, please use:
```bash
make commitlint
```

### Usage

After installation you can use `git cz` and run through the options, it will build your commit message. For example:

```
? Select the type of change that you're committing: refactor: A code change that neither fixes a bug nor adds a feature (formatting, performance improvement, etc)
? Enter JIRA issue (AK-12345) (optional): PRSDM-5026
? What is the scope of this change (e.g. component or file name): (press enter to skip)
? Write a short, imperative tense description of the change:
[------------------------------------------------------------------------] 51 chars left
refactor: PRSDM-5026 update makefile and readme
? Provide a longer description of the change: (press enter to skip)

? Are there any breaking changes? No
? Does this change affect any open issues? No
```

> **Important!** Any use of `breaking changes` needs to be confirmed with the team as this increments the major version number.

### Commitizen

[Commitizen](http://commitizen.github.io/cz-cli/) is a CLI tool that prompts you to fill in the required commit fields at commit time.
After the setup, you should be able to use `git cz` to build your commit messages.

[Commitizen Jira Smart Commit Plugin](https://github.com/anastariqkhan/cz-conventional-changelog-jira-smart-commits) expands to traditional
commitizen prompt to also prompts for a Jira issue and how you would like update the Jira issue.

### Conventional Commit Intellij Plugin

If you use Intellij IDEA as your IDE, you could install the [Conventional Commit Plugin](https://plugins.jetbrains.com/plugin/13389-conventional-commit), and then
you can build your conventional commit messages directly in the IDE.

### Commit Linting

[Commitlint](https://commitlint.js.org/#/) is used for linting the commit messages on the CI pipeline to ensure that all commit messages adhere to the Conventional Commits 1.0.0 specification.

[Husky](https://typicode.github.io/husky/) is used for a [commit hook](https://commitlint.js.org/guides/local-setup.html#using-a-git-hooks-manager).

---

## Semantic Releases

This repository uses [Semantic Release](https://semantic-release.gitbook.io/semantic-release/) tool to automate version management and package publishing.

Upon merging into to the main or develop branch, Semantic Release tool will:
- Calculate the new release version based on the commits
- Create a git commit and a git tag for the release
- Create a Release with release notes from the commit messages
- Create and publish the container images

---

## Branching

Please see this [Presidium Git Strategy Miro board](https://miro.com/app/board/uXjVPK0XxiU=/).

In summary:
- `main` ⇾ production
- Only hotfixes or `develop` get merged into `main`
- `develop`
- Feature branches and bug fixes are branched from and merged into `develop`
- `feat/<TITLE>`
- If there is a feature in development it will be on a feature branch

---
51 changes: 0 additions & 51 deletions build/github_release.sh

This file was deleted.

49 changes: 0 additions & 49 deletions build/include.sh

This file was deleted.

Loading
Loading