Skip to content

Commit

Permalink
Update validateRepositoryManager.ts (#166)
Browse files Browse the repository at this point in the history
## Description

Please include a summary of the change and which issue is fixed. Please
also include relevant motivation and context. List any dependencies that
are required for this change.

Fixes # (issue)

## Type of change

Please delete options that are not relevant.

- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing
functionality to not work as expected)
- [ ] Intermediate change (work in progress)

## How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide
instructions so we can reproduce. Please also list any relevant details
for your test configuration

- [ ] Test A
- [ ] Test B

## Checklist:

- [ ] Performed a self-review of my own code
- [ ] npm test passes on your machine
- [ ] New tests added or existing tests modified to cover all changes
- [ ] Code conforms with the style guide
- [ ] API Documentation in code was updated
- [ ] Any dependent changes have been merged and published in downstream
modules
  • Loading branch information
sadarunnisa-sf authored Jun 27, 2024
1 parent e7a8a2f commit 901338c
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ export const isUserAllowed = async (
): Promise<boolean> => {
try {
const token = process.env.GITHUB_TOKEN; // GitHub token with appropriate permissions
console.log(`${process.env.GITHUB_API_URL}/orgs/${process.env.GITHUB_ORGANIZATION}/teams/${process.env.REPO_CREATOR_TEAM}/memberships/${user}`); // NOSONAR
const response = await axios.get(
`${process.env.GITHUB_API_URL}/orgs/${process.env.GITHUB_ORGANIZATION}/teams/${process.env.REPO_CREATOR_TEAM}/memberships/${user}`,
{
Expand All @@ -14,7 +15,7 @@ export const isUserAllowed = async (
},
},
);

console.log('response.data-------',response,response.data); // NOSONAR
const userAccess = response.data;
return (
userAccess.role &&
Expand Down

0 comments on commit 901338c

Please sign in to comment.