-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 3d0c497
Showing
14 changed files
with
13,165 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
{ | ||
"env": { | ||
"commonjs": true, | ||
"es6": true, | ||
"node": true | ||
}, | ||
"extends": [ | ||
"eslint:recommended", | ||
"plugin:@typescript-eslint/recommended" | ||
], | ||
"parser": "@typescript-eslint/parser", | ||
"globals": { | ||
"Atomics": "readonly", | ||
"SharedArrayBuffer": "readonly" | ||
}, | ||
"parserOptions": { | ||
"ecmaVersion": "latest", | ||
"sourceType": "module" | ||
}, | ||
"plugins": [ | ||
"@typescript-eslint" | ||
], | ||
"rules": { | ||
"@typescript-eslint/no-non-null-assertion": "off", | ||
"@typescript-eslint/no-explicit-any": "off", | ||
"indent": [ | ||
"error", | ||
2 | ||
], | ||
"linebreak-style": [ | ||
"error", | ||
"unix" | ||
], | ||
"quotes": [ | ||
"error", | ||
"double" | ||
], | ||
"semi": [ | ||
"error", | ||
"always" | ||
] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
--- | ||
name: Action Major Tag | ||
on: | ||
push: | ||
tags: ['v[0-9]+.[0-9]+.[0-9]+'] | ||
workflow_dispatch: | ||
|
||
jobs: | ||
new-major-tag: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Run Action Major Tagger | ||
uses: discoverygarden/action-major-tag@main | ||
with: | ||
prefix: v |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
--- | ||
name: Enforce Labeling | ||
on: | ||
pull_request_target: | ||
types: [opened, synchronize, reopened, labeled, unlabeled] | ||
branches: | ||
- main | ||
workflow_dispatch: | ||
|
||
jobs: | ||
check_labels: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check Pull Request Labels | ||
uses: discoverygarden/enforce-label@main | ||
with: | ||
required_labels: major,minor,patch,no-update |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
--- | ||
name: Semantic Version tagger | ||
on: | ||
pull_request_target: | ||
types: closed | ||
branches: | ||
- main | ||
jobs: | ||
update: | ||
if: github.event.pull_request.merged == true | ||
runs-on: ubuntu-latest | ||
- name: Run Semantic Version tagging action | ||
uses: discoverygarden/auto-semver@v1 | ||
- name: Update Major Tag | ||
uses: discoverygarden/action-major-tag@main | ||
with: | ||
prefix: 'v' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
node_modules |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
# Enforce Labels | ||
|
||
A Github action to enforce labeling a pull request with specified labels. | ||
|
||
## Inputs | ||
- **required_labels:** A list of labels that at least one is required on the pull request. | ||
|
||
## Outputs | ||
Currently there are no outputs defined for this workflow. | ||
|
||
## Secrets | ||
This action does not use any secrets. | ||
|
||
## Usage | ||
Learn more about GitHub Actions in general [here](https://docs.github.com/en/actions/quickstart). | ||
|
||
To use this action in your repo, follow these steps: | ||
|
||
1. Create a YAML file in the `.github/workflows/` directory of your repo. | ||
2. Copy the following into the YAML file: | ||
```yaml | ||
--- | ||
name: Enforce Labeling | ||
on: | ||
pull_request_target: | ||
types: [opened, synchronize, reopened, labeled, unlabeled] | ||
branches: | ||
- main | ||
workflow_dispatch: | ||
|
||
jobs: | ||
check_labels: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check Pull Request Labels | ||
uses: discoverygarden/enforce-label@main | ||
with: | ||
required_labels: major,minor,patch,no-update | ||
``` | ||
The labels provided in this case are our typical semantic version tagging labels, as well as a `no-update` label that will not initiate the semantic tagging workflow, in the rare case we don't want to initiate the workoflow. | ||
|
||
The `types` on the `pull_request_target` are the base conditions `[opened, synchronize, reopened]` as well as two scenarios `[labeled, unlabeled]` which we want to track as we're specifically dealing with labels. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
name: 'Enforce Label' | ||
description: 'Bump the major version reference tag for the action.' | ||
inputs: | ||
required_labels: | ||
description: 'A list of labels that at least one is required on the pull request.' | ||
required: true | ||
runs: | ||
using: 'node16' | ||
main: 'dist/index.js' | ||
branding: | ||
icon: 'tag' | ||
color: 'purple' |
Oops, something went wrong.