-
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.
Signed-off-by: Jonas Rittershofer <[email protected]>
- Loading branch information
Showing
7 changed files
with
28 additions
and
22 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 |
---|---|---|
@@ -1,13 +1,12 @@ | ||
Use as: | ||
`npm run generate -- --version=3.3.0` | ||
|
||
CLI Options | ||
The following options can be given to the script either via CLI Argument or as a key value pair in a file named `config.json` in the repository root. | ||
- `ghtoken` - Token to access github. Necessary for large number of requests. | ||
- `repository` - including org and repository -> e.g. `nextcloud/forms` | ||
- `repository` - including owner and repository -> e.g. `nextcloud/forms` | ||
- `base` - Base-Branch, the PRs are merged to. Defaults to `main` | ||
- `excludeLabels` - Array of strings. PRs which contain at least one of the given labels will be excluded. Defaults to `["dependencies"]`. As CLI Argument these should be given as comma-separated list, e.g. `--excludeLabels=dependencies,translations`. | ||
- `out` - Output Filename. Defaults to `nc_changelog.md` | ||
- `releaseDate` - Date of the new release. Defaults to today's date. | ||
- `version` - Tag-Name of upcoming release. | ||
- `previousVersion` - Tag-Name of the previous release. Defaults to latest Github release. | ||
|
||
All these options are possible to store a default value in a file named `config.json` in the repository root. Such they dont have to be given on each execution. |
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
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
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
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
This file was deleted.
Oops, something went wrong.
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,13 @@ | ||
/** | ||
* Check if PR contains Labels | ||
* @param {Object} pull Pull-Request Object to check | ||
* @param {Array.<string>} labels Array of labels to check for | ||
* @returns {Boolean} Label found | ||
*/ | ||
const findLabels = function (pull, labels) { | ||
return labels.some(searchL => { | ||
return pull.labels.some(l => l.name === searchL) | ||
}) | ||
} | ||
|
||
export default findLabels |