Skip to content

Commit

Permalink
Fix dependabot workflow and update idea codeStyle
Browse files Browse the repository at this point in the history
  • Loading branch information
ogesaku committed Jan 17, 2023
1 parent af0f10f commit bcefdbf
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 23 deletions.
15 changes: 9 additions & 6 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
Thanks for submitting a pull request!
<!-- Thanks for submitting a pull request! -->
## Changes
<!-- Shortly describe what you want to accomplish with this PR -->
<!-- Add a link to the issue if available -->

- Please check that there is no similar [pull request](https://github.com/coditory/gradle-integration-test-plugin/pulls) already submitted
- Please provide enough information so that others can review your pull request
- Add a [reference](https://docs.github.com/en/communities/using-templates-to-encourage-useful-issues-and-pull-requests/creating-a-pull-request-template-for-your-repository) to a related [issue](https://github.com/coditory/gradle-integration-test-plugin/issues) if possible

For more information, see the [CONTRIBUTING guide](https://github.com/coditory/gradle-integration-test-plugin/blob/main/.github/CONTRIBUTING.md).
## Checklist
- [ ] I have tested that there is no similar [pull request](https://github.com/coditory/gradle-integration-test-plugin/pulls) already submitted
- [ ] I have read [contributing.md](https://github.com/coditory/gradle-integration-test-plugin/blob/master/.github/CONTRIBUTING.md) and applied to the rules
- [ ] I have unit tested code changes and performed a self-review
- [ ] I have [tested plugin change locally](https://github.com/coditory/gradle-integration-test-plugin/blob/master/.github/CONTRIBUTING.md#validate-changes-locally) on a sample project
9 changes: 1 addition & 8 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: "Pull Request"

on: [ pull_request_target ]
on: [pull_request_target]

jobs:
label-pr:
Expand All @@ -14,7 +14,6 @@ jobs:
repo-token: "${{ secrets.GITHUB_TOKEN }}"

dependabot:
needs: [ build ]
runs-on: ubuntu-latest
if: ${{ github.event.pull_request.user.login == 'dependabot[bot]' }}
permissions:
Expand All @@ -31,12 +30,6 @@ jobs:
PR_URL: ${{ github.event.pull_request.html_url }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Enable auto-merge Dependabot PRs
run: gh pr merge --auto --merge "$PR_URL"
env:
PR_URL: ${{ github.event.pull_request.html_url }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Approve patch and minor updates
if: ${{ steps.dependabot-metadata.outputs.update-type != 'version-update:semver-major' }}
run: gh pr review $PR_URL --approve -b "Pull request **approved** because **it includes a patch or minor update**"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ on:
required: true
default: RELEASE
release:
types: [ published ]
types: [published]

jobs:
release:
Expand Down
9 changes: 3 additions & 6 deletions .idea/codeStyles/Project.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,8 @@ internal object IntegrationTestTaskConfiguration {
private fun configureKotlinCompilation(project: Project) {
// coditory/gradle-build-plugin fails with `extensions.getByType`
// it's a special case when another kotlin plugin applies this plugin in tests
val kotlin = project.extensions.findByType(org.jetbrains.kotlin.gradle.dsl.KotlinJvmProjectExtension::class.java)
?: return
val kotlin = project.extensions
.findByType(org.jetbrains.kotlin.gradle.dsl.KotlinJvmProjectExtension::class.java) ?: return
kotlin.target.compilations.getByName(INTEGRATION_CONFIG_PREFIX) {
val test = kotlin.target.compilations.getByName(SourceSet.TEST_SOURCE_SET_NAME)
it.associateWith(test)
Expand Down

0 comments on commit bcefdbf

Please sign in to comment.