-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bug fixes for dependabot changelog verifier (#4364)
* Fix token usage for changelog helper Signed-off-by: Kunal Kotwani <kkotwani@amazon.com> * Add conditional check for dependabot steps Signed-off-by: Kunal Kotwani <kkotwani@amazon.com> * Add dependency section Signed-off-by: Kunal Kotwani <kkotwani@amazon.com> * Bug fixes for dependabot changelog verifier Signed-off-by: Kunal Kotwani <kkotwani@amazon.com> * Update the changelog Signed-off-by: Kunal Kotwani <kkotwani@amazon.com> Signed-off-by: Kunal Kotwani <kkotwani@amazon.com> (cherry picked from commit 4a6e937)
- Loading branch information
1 parent
19bbe0a
commit 94604fb
Showing
5 changed files
with
146 additions
and
7 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
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 @@ | ||
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/github-app-token@v1.5.0 | ||
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 Gradle SHAs | ||
run: | | ||
./gradlew updateSHAs | ||
- name: Commit the changes | ||
uses: stefanzweifel/git-auto-commit-action@v4.7.2 | ||
with: | ||
commit_message: Updating SHAs | ||
branch: ${{ github.head_ref }} | ||
commit_user_name: dependabot[bot] | ||
commit_user_email: support@github.com | ||
commit_options: '--signoff' | ||
|
||
- name: Run spotless | ||
run: | | ||
./gradlew spotlessApply | ||
- name: Commit the changes | ||
uses: stefanzweifel/git-auto-commit-action@v4.7.2 | ||
with: | ||
commit_message: Spotless formatting | ||
branch: ${{ github.head_ref }} | ||
commit_user_name: dependabot[bot] | ||
commit_user_email: support@github.com | ||
commit_options: '--signoff' | ||
|
||
- name: Update the changelog | ||
uses: dangoslen/dependabot-changelog-helper@v1 | ||
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: support@github.com | ||
commit_options: '--signoff' |
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,49 @@ | ||
# 'true' will fix files | ||
autofix: true | ||
|
||
ignore: | ||
- .git/ | ||
- .gradle/ | ||
- .idea/ | ||
- '*.sha1' | ||
- '*.txt' | ||
- 'CHANGELOG.md' | ||
- '.github/CODEOWNERS' | ||
- 'buildSrc/src/testKit/opensearch.build/LICENSE' | ||
- 'buildSrc/src/testKit/opensearch.build/NOTICE' | ||
- 'server/licenses/apache-log4j-extras-DEPENDENCIES' | ||
# Empty files | ||
- 'buildSrc/src/integTest/resources/org/opensearch/gradle/internal/fake_git/remote/build.gradle' | ||
- 'buildSrc/src/integTest/resources/org/opensearch/gradle/internal/fake_git/remote/distribution/archives/oss-darwin-tar/build.gradle' | ||
- 'buildSrc/src/integTest/resources/org/opensearch/gradle/internal/fake_git/remote/distribution/bwc/bugfix/build.gradle' | ||
- 'buildSrc/src/integTest/resources/org/opensearch/gradle/internal/fake_git/remote/distribution/bwc/minor/build.gradle' | ||
- 'buildSrc/src/main/resources/buildSrc.marker' | ||
- 'buildSrc/src/testKit/opensearch-build-resources/settings.gradle' | ||
- 'buildSrc/src/testKit/opensearch.build/settings.gradle' | ||
- 'buildSrc/src/testKit/reaper/settings.gradle' | ||
- 'buildSrc/src/testKit/symbolic-link-preserving-tar/settings.gradle' | ||
- 'buildSrc/src/testKit/testingConventions/empty_test_task/.gitignore' | ||
- 'client/rest-high-level/src/main/resources/META-INF/services/org.opensearch.plugins.spi.NamedXContentProvider' | ||
- 'distribution/bwc/bugfix/build.gradle' | ||
- 'distribution/bwc/maintenance/build.gradle' | ||
- 'distribution/bwc/minor/build.gradle' | ||
- 'distribution/bwc/staged/build.gradle' | ||
- 'libs/ssl-config/src/test/resources/certs/pem-utils/empty.pem' | ||
- 'qa/evil-tests/src/test/resources/org/opensearch/common/logging/does_not_exist/nothing_to_see_here' | ||
- 'qa/os/centos-6/build.gradle' | ||
- 'qa/os/debian-8/build.gradle' | ||
- 'qa/os/oel-6/build.gradle' | ||
- 'qa/os/oel-7/build.gradle' | ||
- 'qa/os/sles-12/build.gradle' | ||
# Test requires no new line for these files | ||
- 'server/src/test/resources/org/opensearch/action/bulk/simple-bulk11.json' | ||
- 'server/src/test/resources/org/opensearch/action/search/simple-msearch5.json' | ||
|
||
rules: | ||
# checks if file ends in a newline character | ||
end-of-file: | ||
# set to true to enable this rule | ||
enable: true | ||
|
||
# if true also checks if file ends in a single newline character | ||
single-new-line: true |
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