Skip to content

Commit

Permalink
* Trying again J:DEF-3582
Browse files Browse the repository at this point in the history
  • Loading branch information
JPLachance committed Nov 12, 2024
1 parent 409ff7f commit dc15b98
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/java-maven-openjdk-dependency-review.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ jobs:
owner: owner,
repo: repo
});
console.log(`Repository properties: ${response.data}`);
console.log(response.data);
const distributedProperty = response.data.find(prop => prop.property_name === 'is_distributed');
const distributedValue = distributedProperty ? distributedProperty.value : 'true';
core.setOutput('is_distributed', distributedValue);
Expand Down
19 changes: 19 additions & 0 deletions .github/workflows/test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
const owner = context.repo.owner;
const repo = context.repo.repo;

const response = await github.request('GET /repos/{owner}/{repo}/properties/values', {
owner: owner,
repo: repo
});
console.log(`Repository properties: ${response.data}`);
const distributedProperty = response.data.find(prop => prop.property_name === 'is_distributed');
const distributedValue = distributedProperty ? distributedProperty.value : 'true';
core.setOutput('is_distributed', distributedValue);

const repoDetails = await github.request('GET /repos/{owner}/{repo}', {
owner: owner,
repo: repo
});
const isPublic = repoDetails.data.private ? 'false' : 'true';
console.log(`Is this a public repo? ${isPublic}`);
core.setOutput('is_public', isPublic);

0 comments on commit dc15b98

Please sign in to comment.