Skip to content

Commit

Permalink
doc: Fix wording and TYPOs
Browse files Browse the repository at this point in the history
  • Loading branch information
jamacku committed Oct 12, 2022
1 parent 69361df commit 49e7ebe
Show file tree
Hide file tree
Showing 10 changed files with 58 additions and 57 deletions.
53 changes: 27 additions & 26 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,15 @@

<!-- -->

Devel Freezer is a GitHub Action that can automatically notify contributors of your opensource project about state of development. When project is in development freeze or when development freeze has ended.
Devel Freezer is a GitHub Action that can automatically notify contributors of your open-source project about the state of development. When the project is in development freeze or when the development freeze has ended.

## How does it work

TBA ...

## Features

* Ability to comment on Pull Requests predefined messages based on latest tags
* Ability to comment on Pull Requests predefined messages based on the latest tags
* Ability to find and update comments from Devel Freezer GitHub Action
* [Policy based](#policy) configuration using YAML syntax
* Support for regular expressions for freezing tags definitions
Expand Down Expand Up @@ -78,22 +78,21 @@ jobs:
policy:
- tags: ['alpha', 'beta']
feedback:
freezed-state: |
We are currently in ...
Please ...
un-freezed-state: |
We are no longer in ...
frozen-state: |
🥶 We are currently in ...
🙏 Please ...
unfreeze-state: |
😎 We are no longer in ...
# Suport for regular expressions
- tags: ['^\S*-rc\d$']
feedback:
freezed-state: |
We are currently in development freeze.
frozen-state: |
We are currently in a development freeze phase.
Please ...
unfreezed-state: |
We had succesfully released new major release.
We are no longer in development freeze.
# ...
unfreeze-state: |
We had successfully released a new major release.
We are no longer in a development freeze phase.
```
### Real-life examples
Expand Down Expand Up @@ -124,25 +123,27 @@ Token used to create comments. Minimal required permissions are `contents: read`

## Policy

It's required to define freezing policy for Action for behave correctly. Policy can be defined using `.github/development-freeze.yml` configuration file. Structure needs to be as follows:
It's required to define a freezing policy for Action to behave correctly. The policy can be defined using `.github/development-freeze.yml` configuration file. The structure needs to be as follows:

```yml
policy:
- tags: ['alpha', 'beta']
feedback:
freezed-state: |
frozen-state: |
🥶 We are currently in ...
🙏 Please ...
un-freezed-state: |
unfreeze-state: |
😎 We are no longer in ...
# Suport for regular expressions
- tags: ['^\S*-rc\d$']
feedback:
freezed-state: |
We are currently in development freeze.
frozen-state: |
We are currently in a development freeze phase.
Please ...
unfreezed-state: |
We had succesfully released new major version.
We are no longer in development freeze.
unfreeze-state: |
We had successfully released a new major release.
We are no longer in a development freeze phase.
# tags: ...
```

Expand All @@ -152,14 +153,14 @@ Array of tag names and/or regular expressions describing freezing tag scheme (e.

* requirements: `required`

### `feedback.freezed-state` keyword
### `feedback.frozen-state` keyword

Message that is going to be displayed in form of comment when development freeze conditions are met. Support for multi-line string using `|` YAML syntax.
The message that is going to be displayed in form of a comment when development freeze conditions are met. Support for a multi-line string using `|` YAML syntax.

* requirements: `required`

### `feedback.un-freezed-state` keyword
### `feedback.unfreeze-state` keyword

Message that is going to replace development freeze mesage when development freeze conditions are no longer met. Support for multi-line string using `|` YAML syntax.
The message that is going to replace the development freeze message when development freeze conditions are no longer met. Support for a multi-line string using `|` YAML syntax.

* requirements: `required`
* requirements: `required`
4 changes: 2 additions & 2 deletions dist/config.d.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 6 additions & 6 deletions dist/config.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/config.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 6 additions & 6 deletions dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

12 changes: 6 additions & 6 deletions src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,22 +90,22 @@ class PolicyItem {
class Feedback {
@IsString()
@MinLength(1)
private _freezedState: string;
private _frozenState: string;

@IsString()
@MinLength(1)
private _unFreezedState: string;
private _unFreezeState: string;

constructor(feedback: TFeedback) {
this._freezedState = feedback['freezed-state'];
this._unFreezedState = feedback['un-freezed-state'];
this._frozenState = feedback['frozen-state'];
this._unFreezeState = feedback['unfreeze-state'];
}

get freezedState() {
return this._freezedState;
return this._frozenState;
}

get unFreezedState() {
return this._unFreezedState;
return this._unFreezeState;
}
}
4 changes: 2 additions & 2 deletions src/types.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ export type TPolicyItem = {
};

export type TFeedback = {
'freezed-state': string;
'un-freezed-state': string;
'frozen-state': string;
'unfreeze-state': string;
};
10 changes: 5 additions & 5 deletions test/unit/__snapshots__/config.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ exports[`Config Object > get policy() 1`] = `
[
PolicyItem {
"_feedback": Feedback {
"_freezedState": "This is No-No",
"_unFreezedState": "This is Yes-Yes",
"_frozenState": "This is No-No",
"_unFreezeState": "This is Yes-Yes",
},
"_tags": [
"alpha",
Expand Down Expand Up @@ -55,10 +55,10 @@ exports[`Config Object > is invalid 4`] = `
[
{
"notes": {
"isString": "_freezedState must be a string",
"minLength": "_freezedState must be longer than or equal to 1 characters",
"isString": "_frozenState must be a string",
"minLength": "_frozenState must be longer than or equal to 1 characters",
},
"property": "_policy.0._feedback._freezedState,_unFreezedState",
"property": "_policy.0._feedback._frozenState,_unFreezeState",
"value": undefined,
},
]
Expand Down
4 changes: 2 additions & 2 deletions test/unit/fixtures/config.fixture.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ export const configContextFixture: IConfigTestContext = {
{
tags: ['alpha', 'beta'],
feedback: {
'freezed-state': 'This is No-No',
'un-freezed-state': 'This is Yes-Yes',
'frozen-state': 'This is No-No',
'unfreeze-state': 'This is Yes-Yes',
},
},
],
Expand Down

0 comments on commit 49e7ebe

Please sign in to comment.