diff --git a/pr-conventional-to-toptal-commits/README.md b/pr-conventional-to-toptal-commits/README.md index 028ea4d..9b3bffb 100644 --- a/pr-conventional-to-toptal-commits/README.md +++ b/pr-conventional-to-toptal-commits/README.md @@ -6,7 +6,11 @@ Convert a PR title from conventional commits to Toptal commit ### Inputs -Not specified +The list of arguments, that are used in GH Action: + +| name | type | required | default | description | +| -------------- | ------ | -------- | ------- | ----------------- | +| `github-token` | string | ✅ | | Github user token | ### Outputs @@ -21,6 +25,7 @@ Not specified Formatting dependabot commit messages: ```yaml +name: Format dependabot PR title to Toptal's commit convention on: pull_request: types: [opened] @@ -28,8 +33,11 @@ on: jobs: format_title: + name: Format title if: startsWith(github.head_ref, 'dependabot-') - runs-on: ['org/toptal', 'os/linux', 'arch/x64', 'size/large'] + runs-on: ['org/toptal', 'os/linux', 'arch/x64', 'size/large', 'ubuntu-latest'] steps: - uses: toptal/davinci-github-actions/pr-conventional-to-toptal-commits + with: + github-token: ${{ secrets.TOPTAL_DEVBOT_TOKEN }} ``` diff --git a/pr-conventional-to-toptal-commits/action.yml b/pr-conventional-to-toptal-commits/action.yml index 2a866a9..cd49ecb 100644 --- a/pr-conventional-to-toptal-commits/action.yml +++ b/pr-conventional-to-toptal-commits/action.yml @@ -1,6 +1,11 @@ name: PR Conventional to Toptal Commit description: Convert a PR title from conventional commits to Toptal commit +inputs: + github-token: + required: true + description: Github user token + runs: using: composite steps: @@ -20,12 +25,12 @@ runs: } const newPr = { - owner: github.context.repo.owner, - repo: github.context.repo.repo, - pull_number: github.context.payload.pull_request.number, - title: convertConventional(github.context.payload.pull_request.title) + owner: context.repo.owner, + repo: context.repo.repo, + pull_number: context.payload.pull_request.number, + title: convertConventional(context.payload.pull_request.title) } - octokit.pulls.update(newPr); + github.pulls.update(newPr);