Commit Graph
145 Commits
Author SHA1 Message Date
Mike PenzandGitHub 6757bebf45 - fix array placeholders are not correctly replaced 2023-02-26 12:15:03 +00:00
Mike PenzandGitHub cad1ca5504 - enhance performance (remove code duplication)
- we can now fetch full reviews, no need to do reviewers individually
- enhanced logging
2023-02-26 12:14:43 +00:00
Mike PenzandGitHub 0ce8384e73 - add additional logs on handling of configs (e.g. identify which config was picked) - outline if no config was picked and defaults are used 2023-02-26 12:13:36 +00:00
Mike PenzandGitHub 6bf521e144 - introduce additional debug logs 2023-02-26 11:03:59 +00:00
giambo 62a76fe0dc Add category title to changelog only if present; avoid "undefined" if not specified. 2023-01-28 13:05:28 +01:00
Mike PenzandGitHub 981b531f21 - ensure to detect if a PR was matched once (e.g. it's not not categorized) 2023-01-06 10:04:01 +00:00
Mike PenzandGitHub 50dd476bd1 - enhance handling for exhaustive matching
- exhaustive will apply on rules and labels alike
- simplify code
- introduce new testcases to check the new behavior
2023-01-06 09:13:30 +00:00
Mike PenzandGitHub 793329d870 - introduce new rules for the Category
- the rules can be used to match specified `Properties` with a `RegExp` (uses `test`) - to add them into a category
  - This allows more complex changelogs to be constructed, which for example want all `OPEN` PRs in one category
2023-01-03 17:29:56 +00:00
Mike PenzandGitHub 77b2076a3f - add support for configs to be provided from file and json
- define priority on the config json from YML, followed by file, last with the default value
  - Simplify code by merging configs right away
  - thanks for the suggestion @dtcMLOps
2023-01-03 15:44:57 +00:00
Mike PenzandGitHub e0b335b098 - add ability to trim values prior to inserting them in templates 2022-12-09 14:55:28 +00:00
Mike PenzandGitHub 27d0a0a53c - update replacement logic for array and comment types (fix cleanup if no match)
- adjust style definition - 140 line length
2022-12-09 14:09:40 +00:00
Mike PenzandGitHub 24f4e30f9f - introduce proper configuration for fetchReviews
- drop no longer needed limiting of PRs
- retrieve state from PR review comment
2022-12-09 13:29:06 +00:00
Mike PenzandGitHub 2fe056f840 - optimize performance by respecting the max_pull_request setting for fetching PRs via the API already 2022-12-09 13:03:23 +00:00
Mike PenzandGitHub 5c9a6d23c2 - limit final pull requests based on the defined max_pull_requests count 2022-12-09 13:03:23 +00:00
Mike PenzandGitHub 38aabea998 - add capability to fetch review comments and use them as part of the target template
- allow array syntax to be used as part of reviewers, approvers, assignees
2022-12-09 13:03:23 +00:00
Mike PenzandGitHub 7885e80a58 - fix undefined for match regex
- FIX https://github.com/mikepenz/release-changelog-builder-action/issues/965
2022-12-09 12:46:07 +00:00
Mike Penz 2800a9dd18 - introduce more lgos to better identify when PRs are filtered out
- Related to: https://github.com/mikepenz/release-changelog-builder-action/issues/939
2022-10-27 17:02:32 +02:00
Mike Penz 6d479c1d5a - format and recompile dist 2022-10-19 17:34:04 +02:00
Mike Penz 727fe7d827 - differentiate full match vs no match by checking the regex match when filling the placeholders
- This means that transforms which don't match to function as before, but also offers the flexibility if a match results in the equal content as the original to be handled properly
   - FIX https://github.com/mikepenz/release-changelog-builder-action/issues/929
2022-10-19 17:29:01 +02:00
Mike PenzandGitHub 8fcad8a0a0 - add support for NO_PROXY setup
- Based on https://github.com/tillganster/create-pull-request/blob/f9980167df95c66e46f8a787ae951954cb5cfc6d/src/octokit-client.ts
2022-08-26 08:51:46 +00:00
Mike Penz 89e7a9caf5 - valid does not take the includePrerelease option 2022-08-16 17:07:20 +02:00
Mike Penz e5c1179611 - dependency updates
```
Package                    Current  Wanted  Latest  Location                                Depended by
@octokit/rest               19.0.3  19.0.4  19.0.4  node_modules/@octokit/rest              release-changelog-builder-action
@types/jest                 28.1.6  28.1.7  28.1.7  node_modules/@types/jest                release-changelog-builder-action
@types/node                 18.6.5  18.7.6  18.7.6  node_modules/@types/node                release-changelog-builder-action
@types/semver               7.3.10  7.3.12  7.3.12  node_modules/@types/semver              release-changelog-builder-action
@typescript-eslint/parser   5.33.0  5.33.1  5.33.1  node_modules/@typescript-eslint/parser  release-changelog-builder-action
eslint                      8.21.0  8.22.0  8.22.0  node_modules/eslint                     release-changelog-builder-action
eslint-plugin-jest          26.8.2  26.8.3  26.8.3  node_modules/eslint-plugin-jest         release-changelog-builder-action
ts-jest                     28.0.7  28.0.8  28.0.8  node_modules/ts-jest                    release-changelog-builder-action
```
2022-08-16 16:56:54 +02:00
Malte Hallström e8ee90b94f - cleanup unmatched custom ph:s from pr template 2022-08-16 16:05:39 +02:00
Mike PenzandGitHub e38965eec7 - adjust agent to be undefined instead of an empty object 2022-08-10 12:20:56 +00:00
Florian Hopfensperger 97db2b0c39 Add HTTP proxy functionality
Signed-off-by: Florian Hopfensperger <florian.hopfensperger@allianz.de>

- lower proxy functionality to Https for now (the general proxy package adds a ton of dependencies - which are difficult to review)

Add octokit documentation

Signed-off-by: Florian Hopfensperger <florian.hopfensperger@allianz.de>

Lint & build & packaged

Signed-off-by: Florian Hopfensperger <florian.hopfensperger@allianz.de>
2022-08-10 08:36:32 +02:00
Mike PenzandGitHub 63b88e3bff - ensure log message is properly displayed as string 2022-08-09 16:47:12 +00:00
Mike PenzandGitHub bed15c1b24 - add more logs for custom placeholders
- write up experimental docs for custom placeholders
2022-08-05 12:45:37 +00:00
Mike Penz 2f418c46e5 - exclude custom placeholder content if there was no match 2022-07-30 08:15:32 +02:00
Mike PenzandGitHub 74dd88f60c - add logic which cleans up custom placeholders with the [] syntax which were not matched 2022-07-29 16:40:39 +00:00
Mike PenzandGitHub fba9cdb51d - expand custom placeholders to the global template
- introuce capability of accessing and referencing custom placeholders of PRs in the global template
```
${{CUSTOM_PLACEHOLDER[0]}}
${{CUSTOM_PLACEHOLDER[*]}}
```
- introduce new testcase checking the custom placeholder functionality
2022-07-29 16:11:14 +00:00
Mike PenzandGitHub 7b1021454a - introduce capability for custom placeholders also to the global template
- introduce new convenient functions to handle this
2022-07-29 14:54:45 +00:00
Mike PenzandGitHub 15a108d43e - introduce ES2021.String for replaceAll
- expand Configuration with `custom_placeholders` configuration
  - custom placeholders allow to extract values of placeholders and then use these in templates
- refactor replacing PR template values
2022-07-29 14:29:50 +00:00
Mike PenzandGitHub b1ea770a88 - reformat source - lineLength 120 2022-07-29 13:48:53 +00:00
Mike PenzandGitHub f55f49981d - adjust placeholder for yml as ${{}} is reserved 2022-07-29 09:30:57 +00:00
Mike PenzandGitHub 02b79cb00a - introduce capability to define the Configuration via the build yml without the requirement of a file
- this also allows to generate changelogs without the need to chech-out
2022-07-29 09:21:44 +00:00
Mike Penz c4a63d86ad - introduce branch (head ref) as data point in the PullRequestInfo object
- expand extractor to allow using the `branch` -> e.g. to extract the label
2022-07-27 17:19:50 +02:00
Mike Penz d2a15abb64 - drop support for tag SHA as in most cases this information is not available at the moment
- introduce new testcase to verify `DAYS_SINCE` calculation
- fix wrong log messages using the `TagInfo` object instead the name
- add additional log messages
2022-07-26 16:48:06 +02:00
Mike Penz c061d0e577 - introduce new configuration flag to fetchReleaseInformation
- if enabled, it will unlock the ability to use new placeholders
  - `${{ DAYS_SINCE }}`
  - `${{ FROM_TAG_DATE }}`
  - `${{ TO_TAG_DATE }}`
- refactor to carry on the full `TagInfo` information instead of only the tagname
- refresh testcases to new apis
2022-07-26 16:47:23 +02:00
Mike Penz 2fd6f64773 - ensure output is properly set also in commitMode 2022-07-26 14:42:20 +02:00
Mike Penz 55354469a8 - introduce new additional placeholders useable for building the changelog
| **Placeholder**            | **Description**                                                                                    | **Empty** |
|----------------------------|----------------------------------------------------------------------------------------------------|:---------:|
| `${{CHANGED_FILES}}`       | The count of changed files.                                                                        |           |
| `${{ADDITIONS}}`           | The count of code additions (lines).                                                               |           |
| `${{DELETIONS}}`           | The count of code deletions (lines).                                                               |           |
| `${{CHANGES}}`             | The count of total changes (lines).                                                                |           |
| `${{COMMITS}}`             | The count of commits in this release.                                                              |           |

- restructure project to return additional diff related information along the individual commits
- update testcases to verify functionality of new placeholders
2022-07-26 14:14:16 +02:00
Mike Penz 4360ffd09f - update dependencies to latest stable versions
```
    "@octokit/rest": "^19.0.1",
    "moment": "^2.29.4",
```
```
    "@types/jest": "^28.1.4",
    "@types/node": "^18.0.3",
    "@typescript-eslint/parser": "^5.30.5",
    "eslint": "^8.19.0",
    "jest": "^28.1.2",
    "jest-circus": "^28.1.2",
    "typescript": "^4.7.4"
```
2022-07-08 10:43:24 +02:00
Mike Penz 89475f1193 - introduce new configuration option, allowing to provide an empty_content for categories matching no PRs
- FIX https://github.com/mikepenz/release-changelog-builder-action/issues/804
2022-07-08 10:40:47 +02:00
ipcjs 0bc0c91c3e Update the note about from/toTag. 2022-06-06 16:08:31 +08:00
Mike Penz 0bb7bd0176 - expand configuration specification by offering sorting by alternative properties -> title instead of mergedAt.
- add more testcases to cover the new sort orders
  - FIX https://github.com/mikepenz/release-changelog-builder-action/issues/757
2022-05-13 11:28:46 +02:00
Mike Penz a86b1b7058 - format the main.ts class 2022-04-15 10:36:10 +02:00
Mike Penz 1e867df2de - introduce new flag allowing to fetch reviewers who approved PRs
- add new testcase which verifies approvers being included
  - adjust config for some test cases to verify reviewers not being pulled if disabled
2022-04-08 12:13:21 +02:00
Mike Penz f60b8b4167 - expand custom assignment and add testcase to verify ability to construct custom categories involving states of PRs 2022-04-08 11:00:40 +02:00
Mike Penz 6211ea4995 - expand log messages
- introduce test case to verify the inclusion of the open PR as part of the standard PR set
2022-04-08 11:00:39 +02:00
Mike Penz 85af6a8181 - introduce new flag to include open PRs into the changelog
- only fetch open with this flag
- expand pull request spec with
  - status, created at timestamp
- expand definition for placeholder patterns in the changelog
2022-04-08 11:00:39 +02:00
Mike Penz 23e9b5fc5a - add additional debug logs to help identify which prs ended up in which category 2022-03-15 08:44:58 +01:00