https://github.com/cpcloud/compare-commits-action
Compare the differences between two commits
https://github.com/cpcloud/compare-commits-action
Last synced: 12 months ago
JSON representation
Compare the differences between two commits
- Host: GitHub
- URL: https://github.com/cpcloud/compare-commits-action
- Owner: cpcloud
- License: mit
- Created: 2021-08-10T10:18:11.000Z (almost 5 years ago)
- Default Branch: main
- Last Pushed: 2025-01-02T19:28:13.000Z (over 1 year ago)
- Last Synced: 2025-01-02T20:28:59.066Z (over 1 year ago)
- Language: TypeScript
- Size: 4.01 MB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
- Codeowners: CODEOWNERS
Awesome Lists containing this project
README
# Compare the Differences Between Two Commits
This action will compare the differences in a commit range and generate a Markdown table that looks like this:
| SHA256 | Commit Message | Pull Requests |
| ----------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------ | --------------------------------------------------------------------------------------------- |
| [`59be1f49`](https://github.com/nix-community/home-manager/commit/59be1f4983ee3689de3172716a6c7e95a6a37bb7) | `dunst: add option to read alternative configuration file (#2113)` |
|
## Usage in a GitHub workflow
```yaml
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Compare commits
uses: cpcloud/compare-commits-action@v2.0.4
with:
owner: nix-community
repo: home-manager
basehead: A...B
token: ${{ secrets.GITHUB_TOKEN }}
verbose: true # this will print the markdown table to the console
```
## Inputs
```yaml
inputs:
owner:
required: true
description: "The owner of the GitHub repository"
repo:
required: true
description: "The GitHub repository name"
basehead:
required: true
description: "The commit range to compare"
token:
required: false
description: "Access token to increase the rate limit for GitHub API requests"
include-merge-commits:
required: false
description: "Whether to show merge commits in the log"
default: "false"
sha-length:
required: false
description: "The short length of the SHA256 displayed in the output table"
default: "8"
verbose:
required: false
description: "Print the generated Markdown table to the console"
default: "false"
```
## Outputs
```yaml
outputs:
differences:
description: "A markdown formatted table of differences between two commits"
```