Skip to content

Commit

Permalink
remove LP validation. (#55)
Browse files Browse the repository at this point in the history
* remove LP validation. All future validations should be done either via GitHub username or email
* remove @actions/exec direct dependency
  • Loading branch information
beliaev-maksim authored Nov 14, 2024
1 parent 1fabf3a commit 3df7bab
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 78 deletions.
39 changes: 0 additions & 39 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
const core = require('@actions/core');
const exec = require('@actions/exec');
const github = require('@actions/github');
const axios = require('axios');
const path = require('path');

const githubToken = core.getInput('github-token', {required: true})
const exemptedBots = core.getInput('exempted-bots', {required: true}).split(',').map(input => input.trim());
Expand All @@ -27,14 +25,6 @@ function hasImplicitLicense(commit_message) {
}

async function run() {
// Install dependencies
core.startGroup('Installing python3-launchpadlib')
await exec.exec('sudo apt-get update');
await exec.exec('sudo apt-get install python3-launchpadlib');
core.endGroup()

console.log();

// Get existing contributors
const ghRepo = github.getOctokit(githubToken);
const accept_existing_contributors = (core.getInput('accept-existing-contributors') == "true");
Expand Down Expand Up @@ -130,35 +120,6 @@ async function run() {
}
}

console.log();

// Check Launchpad
for (const i in commit_authors) {
if (commit_authors[i]['signed'] == false) {
console.log('Checking the following user on Launchpad:');
const email = commit_authors[i]['email'];

await exec.exec('python3', [path.join(__dirname, 'lp_cla_check.py'), email], options = {
silent: true,
listeners: {
stdout: (data) => {
process.stdout.write(data.toString());
},
stderr: (data) => {
process.stdout.write(data.toString());
}
}
})
.then((result) => {
commit_authors[i]['signed'] = true;
}).catch((error) => {
commit_authors[i]['signed'] = false;
});
}
}

console.log();

// Determine Result
passed = true
var non_signers = []
Expand Down
33 changes: 0 additions & 33 deletions lp_cla_check.py

This file was deleted.

2 changes: 1 addition & 1 deletion node_modules/.package-lock.json

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

5 changes: 2 additions & 3 deletions package-lock.json

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

3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "has-signed-canonical-cla",
"version": "1.2.0",
"version": "2.0.0",
"description": "This GitHub Action verifies whether or not the authors of a pull request have signed the Canonical Contributor Licence Agreement (https://ubuntu.com/legal/contributors).",
"main": "index.js",
"scripts": {
Expand All @@ -19,7 +19,6 @@
"homepage": "https://github.com/canonical/has-signed-canonical-cla#readme",
"dependencies": {
"@actions/core": "^1.2.6",
"@actions/exec": "^1.0.4",
"@actions/github": "^6.0.0",
"axios": "^1.6.8"
}
Expand Down

0 comments on commit 3df7bab

Please sign in to comment.