Skip to content

Commit

Permalink
Merge pull request #92 from Alokit-Innovations/mkp/function-args-bett…
Browse files Browse the repository at this point in the history
…er-name

changed `org` arg name to `owner` for better understanding
  • Loading branch information
avikalpg authored Feb 23, 2024
2 parents efdf6ac + daad051 commit ca1d116
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "Vibinex Code Review",
"version": "1.1.1",
"version": "1.1.2",
"manifest_version": 3,
"description": "Personalization and context for pull requests on GitHub & Bitbucket",
"key": "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAsRm6EaBdHDBxVjt9o9WKeL9EDdz1X+knDAU5uoZaRsXTmWjslhJN9DhSd7/Ys4aJOSN+s+5/HnIHcKV63P4GYaUM5FhETHEWORHlwIgjcV/1h6wD6bNbvXi06gtiygE+yMrCzzD93/Z+41XrwMElYiW2U5owNpat2Yfq4p9FDX1uBJUKsRIMp6LbRQla4vAzH/HMUtHWmeuUsmPVzcq1b6uB1QmuJqIQ1GrntIHw3UBWUlqRZ5OtxI1DCP3knglvqz26WT5Pc4GBDNlcI9+3F0vhwqwHqrdyjZpIKZ7iaQzcrovOqUKuXs1J3hDtXq8WoJELIqfIisY7rhAvq6b8jQIDAQAB",
Expand Down
16 changes: 8 additions & 8 deletions scripts/repoHandlers.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,17 @@
* @param {string} repoHost - The hosting platform ('github' or 'bitbucket').
* @returns {Array} - List of tracked repositories.
*/
async function getTrackedRepos(orgName, userId, repoHost) {
async function getTrackedRepos(owner, userId, repoHost) {
const { websiteUrl } = await chrome.storage.local.get(["websiteUrl"]);
let body = {};
let url = ''
switch (repoHost) {
case 'github':
body = { org: orgName, userId: userId, provider: 'github' }
body = { owner: owner, userId: userId, provider: 'github' }
url = `${websiteUrl}/api/extension/setup`;
break;
case 'bitbucket':
body = { org: orgName, userId: userId, provider: 'bitbucket' }
body = { owner: owner, userId: userId, provider: 'bitbucket' }
url = `${websiteUrl}/api/extension/setup`;
break;
default:
Expand Down Expand Up @@ -142,15 +142,15 @@ function updateTrackedReposInGitHub(trackedRepos, websiteUrl, ownerType) {
/**
* Displays a floating action button on the repository page if the repository is not being tracked.
*
* @param {string} orgName - The name of the organization or user.
* @param {string} orgRepo - The name of the repository.
* @param {string} owner - The name of the organization or user.
* @param {string} ownerRepo - The name of the repository.
* @param {string} userId - The ID of the user.
* @param {string} websiteUrl - The URL of the website.
* @param {string} repoHost - The hosting platform ('github' or 'bitbucket').
*/
async function showFloatingActionButton(orgName, orgRepo, userId, websiteUrl, repoHost) {
const trackedRepoList = await getTrackedRepos(orgName, userId, repoHost);
if (!trackedRepoList.includes(orgRepo)) {
async function showFloatingActionButton(owner, ownerRepo, userId, websiteUrl, repoHost) {
const trackedRepoList = await getTrackedRepos(owner, userId, repoHost);
if (!trackedRepoList.includes(ownerRepo)) {
createElement("add", websiteUrl);
}
}

0 comments on commit ca1d116

Please sign in to comment.