Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updates changelog for dependabot PRs #247

Merged
merged 2 commits into from
Oct 19, 2022
Merged
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
6 changes: 6 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,15 @@ updates:
package-ecosystem: gradle
schedule:
interval: weekly
labels:
- "dependabot"
- "dependencies"
- directory: /java-client/
open-pull-requests-limit: 1
package-ecosystem: gradle
schedule:
interval: weekly
labels:
- "dependabot"
- "dependencies"
version: 2
37 changes: 37 additions & 0 deletions .github/workflows/dependabot_pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Dependabot PR actions
on: pull_request

jobs:
dependabot:
runs-on: ubuntu-latest
permissions:
pull-requests: write
contents: write
if: ${{ github.actor == 'dependabot[bot]' }}
steps:
- name: GitHub App token
id: github_app_token
uses: tibdex/[email protected]
with:
app_id: ${{ secrets.APP_ID }}
private_key: ${{ secrets.APP_PRIVATE_KEY }}
installation_id: 22958780

- name: Check out code
uses: actions/checkout@v2
with:
token: ${{ steps.github_app_token.outputs.token }}

- name: Update the changelog
uses: dangoslen/dependabot-changelog-helper@v1
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

By default, it runs for if the PR has a dependabot label. I updated that within the dependabot config here - https://github.com/opensearch-project/OpenSearch/blob/main/.github/dependabot.yml#L7-L9
You will have to update the dependabot.yml label config as well.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated. Thanks for letting me know!

with:
version: 'Unreleased'

- name: Commit the changes
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: "Update changelog"
branch: ${{ github.head_ref }}
commit_user_name: dependabot[bot]
commit_user_email: [email protected]
commit_options: '--signoff'
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
## [Unreleased]
### Added
- Github workflow for changelog verification ([#239](https://github.com/opensearch-project/opensearch-java/pull/239))
- Github workflow for dependabot PRs ([#247](https://github.com/opensearch-project/opensearch-java/pull/247))

### Changed

Expand Down