Skip to content

Commit

Permalink
! Debug outputs J:DEF-3582
Browse files Browse the repository at this point in the history
  • Loading branch information
JPLachance committed Nov 12, 2024
1 parent 30f7119 commit e336d60
Showing 1 changed file with 27 additions and 2 deletions.
29 changes: 27 additions & 2 deletions .github/workflows/java-maven-openjdk-dependency-review.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,24 +84,49 @@ jobs:
script: |
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(response.data);
# For debugging purposes
console.log(`Repository properties: ${JSON.stringify(response.data)}`);
const distributedProperty = response.data.find(prop => prop.property_name === 'is_distributed');
# Default to True if the property is not found
const distributedValue = distributedProperty ? distributedProperty.value : 'true';
# To be used in the dependency-review job
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';
core.setOutput('is_public', isPublic);
# For debugging purposes
console.log(`Is this a public repo? ${isPublic}`);
# To be used in the dependency-review job
core.setOutput('is_public', isPublic);
validate-outputs:
needs: get-repository-properties
name: Validate Outputs
runs-on: ubuntu-latest

permissions:
contents: read

steps:
- name: Validate Outputs
run: |
echo "Is Distributed: ${{ needs.get-repository-properties.outputs.is_distributed }}"
echo "Is Public: ${{ needs.get-repository-properties.outputs.is_public }}"
submit-dependencies:
needs: get-repository-properties
name: Submit dependencies
Expand Down

0 comments on commit e336d60

Please sign in to comment.