-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Exclude (#181) Updates the code that reads files to take into account a list of excluded glob patterns * Changelog (#182) * Fixing wiki links * Releasing new version * Updating the reflection version dependency (#189) * Ability to skip changelog creation when there are no changes. (#191) * Changelog example documentation * Run specific command in multi config (#192) * When creating a multi-config configuration, a single command can still be specified * When creating a multi-config configuration, a single command can still be specified * Releasing version
- Loading branch information
1 parent
1112aea
commit 26d2f6b
Showing
15 changed files
with
206 additions
and
87 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
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,63 @@ | ||
# Changelog Example | ||
|
||
This project contains an example on how to generate a changelog using ApexDocs.' | ||
|
||
It has 2 directories: `previous`, which contains the previous version of the project, and `current`, which contains the current version of the project. | ||
|
||
By running the following command, you can generate a changelog between the two versions: | ||
|
||
```bash | ||
apexdocs changelog --previousVersionDir previous --currentVersionDir current | ||
``` | ||
|
||
--- | ||
|
||
## Generating PR Comments with Changelog Information | ||
|
||
One example of how to use the changelog feature is to generate a changelog for a pull request. | ||
|
||
You can achieve this through Github Actions by using a workflow that looks as follows: | ||
|
||
```yaml | ||
on: | ||
pull_request: | ||
branches: [ main ] | ||
types: [ opened, reopened, synchronize, closed ] | ||
|
||
jobs: | ||
comment-pr: | ||
runs-on: ubuntu-latest | ||
name: Comment PR | ||
permissions: | ||
pull-requests: write | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Checkout previous version | ||
uses: actions/checkout@v3 | ||
with: | ||
ref: ${{ github.event.pull_request.base.ref }} | ||
path: previous | ||
|
||
- uses: actions/setup-node@v2 | ||
with: | ||
node-version: "20" | ||
|
||
- name: Install dependencies | ||
run: npm install | ||
|
||
- name: Install ApexDocs globally | ||
run: npm install @cparra/apexdocs --global | ||
|
||
- name: Generate changelog | ||
# Change the previousVersionDir and currentVersionDir to match your project structure | ||
run: apexdocs changelog --currentVersionDir force-app --previousVersionDir './previous/force-app' --targetDir './changelog' | ||
|
||
- name: Comment PR | ||
uses: thollander/actions-comment-pull-request@v2 | ||
with: | ||
# Providing a comment_tag will update the comment if it already exists | ||
comment_tag: 'changelog' | ||
filePath: './changelog/changelog.md' | ||
``` |
14 changes: 7 additions & 7 deletions
14
examples/vitepress/docs/.vitepress/cache/deps/_metadata.json
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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
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 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
Oops, something went wrong.