Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 43 additions & 0 deletions .github/actions/generate-dependabot-changelog/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
<!-- SPDX-License-Identifier: Apache-2.0 -->

# Generate changelog entries action

This action automatically generates changelog entry files for Dependabot commits in the format used by [Log4j Changelog](https://logging.apache.org/log4j/tools/log4j-changelog.html).

## Inputs

### `token`

**Required** The GitHub token. Default `${{ secrets.GITHUB_TOKEN }}`.

### `sha`

**Required** SHA1 of the commit to use. Default `${{ github.sha }}`.

### `changelog-path`

**Required** Base directory where the changelog entries are created. Default `src/changelog`.

## Outputs

### `dependency-count`

Number of changelog entries created.

### `pull-request-number`

Pull request number, if the commit is attached to a PR.

### `pull-request-html-url`

Pull request HTML URL, if the commit is attached to a PR.

## Building

After each change to this action, it needs to be recompiled using:

```shell
npm run test
npm run build
```

45 changes: 45 additions & 0 deletions .github/actions/generate-dependabot-changelog/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to you under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
##
# $schema: https://json.schemastore.org/github-action
name: 'GenerateLog4j changelog entries from Dependabot PRs'
description: |
This action creates changelog entries for Dependabot commits.
For each updated dependency a new changelog entry file is created in the `src/changelog` directory.
inputs:
token:
description: 'GitHub token'
required: true
default: '${{ github.token }}'
sha:
description: 'SHA1 of the commit to use'
required: true
default: '${{ github.sha }}'
changelog-path:
description: 'Directory where the changelog entries are created'
required: true
default: 'src/changelog'
outputs:
dependency-count:
description: 'Number of changelog entries created'
pull-request-html-url:
description: 'HTML URL of the pull request'
pull-request-number:
description: 'Number of the pull request'
runs:
using: 'node20'
main: 'dist/index.js'
Loading
Loading