Skip to content
This repository has been archived by the owner on Sep 30, 2022. It is now read-only.

Commit

Permalink
refactor!: migrate to a nodejs action
Browse files Browse the repository at this point in the history
This change will have the following impact:
* Interactions with GitHub are no longer required by Commisery
* Performance improvement as we no longer require a Docker image
* Addition of a Summary page
* No longer scan the title of the Pull Request
  • Loading branch information
KevinDeJong-TomTom committed May 11, 2022
1 parent a5e0913 commit 3c719ca
Show file tree
Hide file tree
Showing 15 changed files with 10,982 additions and 396 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/commisery.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,11 @@ jobs:
- name: Check-out the repo under $GITHUB_WORKSPACE
uses: actions/checkout@v2

- name: Setup Python
uses: actions/setup-python@v3
with:
python-version: '3.8'

- name: Run Commisery
uses: ./
with:
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
node_modules/
34 changes: 0 additions & 34 deletions Dockerfile

This file was deleted.

201 changes: 0 additions & 201 deletions LICENSE

This file was deleted.

46 changes: 46 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# Check your commits against Conventional Commits using Commisery

Using this GitHub action, scan all commits in your Pull Request against the [Conventional Commits]
standard using [Commisery]

[Conventional Commits]: https://www.conventionalcommits.org/en/v1.0.0/
[Commisery]: https://pypi.org/project/commisery/

## Usage

The workflow, usually declared in `.github/workflows/build.yml`, looks like:

```yml

name: Commisery
on:
pull_request:
types: [edited, opened, synchronize, reopened]

jobs:
commit-message:
name: Conventional Commit Message Checker (Commisery)
runs-on: ubuntu-latest
steps:
- name: Check-out the repo under $GITHUB_WORKSPACE
uses: actions/checkout@v3

- name: Run Commisery
uses: KevinDeJong-TomTom/commisery-action@master
with:
token: ${{ secrets.GITHUB_TOKEN }}
pull_request: ${{ github.event.number }}
```

## Inputs

- **token**: GitHub Token provided by GitHub, see [Authenticating with the GITHUB_TOKEN]
- **pull_request**: Pull Request number, provided by the [GitHub contex].

[Authenticating with the GITHUB_TOKEN]: https://help.github.com/en/actions/automating-your-workflow-with-github-actions/authenticating-with-the-github_token
[GitHub context]: https://docs.github.com/en/actions/reference/context-and-expression-syntax-for-github-actions#github-context


## Example of Conventional Commit check results

![example](resources/example.png)
50 changes: 0 additions & 50 deletions README.rst

This file was deleted.

9 changes: 3 additions & 6 deletions action.yml
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (C) 2020-2020, TomTom (http://tomtom.com).
# Copyright (C) 2020-2022, TomTom (http://tomtom.com).
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -32,8 +32,5 @@ inputs:
required: true

runs:
using: docker
image: Dockerfile
args:
- ${{ inputs.token }}
- ${{ inputs.pull_request }}
using: 'node16'
main: 'dist/commisery/index.js'
Loading

0 comments on commit 3c719ca

Please sign in to comment.