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

feat!: Implementation of functionality #1

Merged
merged 13 commits into from
Dec 21, 2023
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
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ jobs:
- name: Run DependaMerge
uses: ./
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
token: ${{ secrets.GITHUB_TOKEN }}
submodule: true


24 changes: 0 additions & 24 deletions __tests__/wait.test.js

This file was deleted.

80 changes: 69 additions & 11 deletions action.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,77 @@
name: 'The name of your action here'
description: 'Provide a description here'
author: 'Your name or organization here'
name: 'DependaMerge'
description: 'Automatic validation, approval and merging of pull requests, created and processed by dependabot[bot]'
author: 'Daily DevOps & .NET'
branding:
icon: 'package'
color: 'purple'

# Define your inputs here.
inputs:
milliseconds:
description: 'Your input description here'
token:
description: 'The GitHub token used to merge the pull-request'
required: true
default: '1000'

approve:
description: 'Approve the pull-request before merging. Valid values: true or false - Default: true'
required: false
default: true

approve-only:
description: 'Only approve the pull-request. Valid values: true or false - Default: false'
required: false
default: false

command:
description: 'The command to pass to Dependabot. Valid values: merge or squash - Default: squash'
required: false
default: squash

submodule:
description: 'If true, the action will merge pull-requests with submodule updates. Valid values: true or false - Default: false'
required: false
default: false

target:
description: 'The version comparision target. Valid values: major, minor or patch - Default: minor'
required: false
default: minor

skip-commit-verification:
description: 'If true, then the action will not expect the commits to have a verification signature. It is required to set this to true in GitHub Enterprise Server'
required: false
default: false

skip-verification:
type: boolean
description: 'If true, the action will not validate the user or the commit verification status'
default: false

# Define your outputs here.
outputs:
time:
description: 'Your output description here'
# outputs:
# time:
# description: 'Your output description here'

runs:
using: node20
main: dist/index.js
using: composite
steps:
- name: Fetch metadata
id: metadata
uses: dependabot/[email protected]
if: github.event_name == 'pull_request' && (github.actor == 'dependabot[bot]')
with:
skip-commit-verification: ${{ inputs.skip-commit-verification }}
skip-verification : ${{ inputs.skip-verification }}

- name: DependaMerge
id: dependamerge
uses: actions/[email protected]
with:
github-token: ${{ inputs.token }}
script: |
const script = require('${{ github.action_path }}dist/index.js')
await script({
github,
context,
inputs: ${{ toJSON(inputs) }},
metadata: ${{ toJSON(steps.dependabot-metadata.outputs) }},
})
2 changes: 1 addition & 1 deletion badges/coverage.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Loading