From 4b3e162e86754b4115ac4afb01749d89fc7b09e5 Mon Sep 17 00:00:00 2001 From: Marcus Tomlinson Date: Fri, 19 Mar 2021 01:25:26 +0000 Subject: [PATCH] Run cla_check.py from within repo --- README.md | 2 +- index.js | 3 ++- package-lock.json | 2 +- package.json | 2 +- 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 53c8d6c..a2c8574 100644 --- a/README.md +++ b/README.md @@ -30,7 +30,7 @@ jobs: steps: - name: Check if CLA signed id: has_signed_cla - uses: canonical/has-signed-canonical-cla@1.0.5 + uses: canonical/has-signed-canonical-cla@1.0.6 with: username: ${{ github.event.pull_request.user.login }} base_ref: ${{ github.base_ref }} diff --git a/index.js b/index.js index 5451ac4..e8231c8 100644 --- a/index.js +++ b/index.js @@ -47,7 +47,8 @@ async function run() { const base_sha = github.context.payload['pull_request']['base']['sha'] const head_sha = github.context.payload['pull_request']['head']['sha'] - await exec.exec('python ./repo/cla_check.py ' + base_sha + '..' + head_sha) + await exec.exec('cp cla_check.py repo/'); + await exec.exec('python repo/cla_check.py ' + base_sha + '..' + head_sha) .then((result) => { has_signed = true }).catch((error) => { diff --git a/package-lock.json b/package-lock.json index 02cca45..e2898b7 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "has-signed-canonical-cla", - "version": "1.0.5", + "version": "1.0.6", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 980a7cd..2279a21 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "has-signed-canonical-cla", - "version": "1.0.5", + "version": "1.0.6", "description": "This GitHub Action verifies whether or not a particular GitHub user has signed the Canonical Contributor Licence Agreement (https://ubuntu.com/legal/contributors).", "main": "index.js", "scripts": {