Fix create rule command in create_new_rspec github workflow

This commit is contained in:
Nicolas Harraudeau 2021-02-18 12:32:10 +01:00
parent fa1f8ba482
commit 5744c7b409
2 changed files with 4 additions and 4 deletions

View File

@ -13,7 +13,7 @@ jobs:
create_new_rule:
runs-on: ubuntu-latest
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v2
@ -36,4 +36,4 @@ jobs:
- name: 'Create Rule'
working-directory: 'rspec/rspec-tools'
run: pipenv run rspec-tools create-rule --languages "${{ github.event.inputs.languages }}"
run: pipenv run rspec-tools create-rule --user ${{ github.actor }} --languages "${{ github.event.inputs.languages }}"

View File

@ -7,9 +7,9 @@ from contextlib import contextmanager
from rspec_tools.utils import copy_directory_content
def build_github_repository_url(token):
def build_github_repository_url(token: str):
'Builds the rspec repository url'
return f'https://{token}:@github.com/SonarSource/rspec.git'
return f'https://{token}@github.com/SonarSource/rspec.git'
def extract_repository_name(url):
url_end = url.split('/')[-2:]