Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generate attribution report #53

Merged
merged 4 commits into from
Jan 22, 2025
Merged

Generate attribution report #53

merged 4 commits into from
Jan 22, 2025

Conversation

dylmye
Copy link
Contributor

@dylmye dylmye commented Dec 27, 2024

Overview

This PR adds the option for users to generate and retrieve an attribution report after they have run analyze.

The inspiration and use case for this feature is from personal needs. I have an app that uses FOSSA, and I want to include the attribution report in the app bundle as part of the release process. Automating the report generation as part of the release process would save time and ensure it's correct for each release version.

I reached out to Kevin after he reached out to us users earlier this month and he pointed me to this repo. Thank you for everything you all do!! Fossa is a really fantastic and beneficial part of the FOSS ecosystem. <3

There's some limitations and questions I have regarding this PR:

  • Only supports the attribution report - no SBOM
  • No timeout argument provided - should there be a sensible default?
  • Is report generation appropriate to be in the scope of your action? Or just something I should fork instead? I'm aware of the message on your README but thought there would be some benefit to users in adding this.
  • Is the format of the input okay? I thought it would be tidier than making two (like generate-report boolean and report-format input)
  • There's no action-side validation of the report format, the aim of this was to reduce maintenance burden

The only other change I made was typing the listeners object passed to the exec function.

Checklist

  • If I changed code, I ran yarn build and committed resulting changes.
  • I added an example exercising this PRs functionality to .github/workflows/test.yml or explained why it doesn't make sense to do so.

@dylmye dylmye requested a review from a team as a code owner December 27, 2024 20:08
@dylmye dylmye requested review from jssblck and removed request for a team December 27, 2024 20:08
@jssblck
Copy link
Member

jssblck commented Jan 8, 2025

Hey @dylmye, thanks for the contribution!

Is report generation appropriate to be in the scope of your action? Or just something I should fork instead? I'm aware of the message on your README but thought there would be some benefit to users in adding this.

We're discussing this and will keep you updated.

Copy link
Member

@jssblck jssblck left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Validated that the dist is correctly generated from the content:

; gh pr checkout 53
remote: Enumerating objects: 23, done.
remote: Counting objects: 100% (23/23), done.
remote: Compressing objects: 100% (9/9), done.
remote: Total 23 (delta 12), reused 23 (delta 12), pack-reused 0 (from 0)
Unpacking objects: 100% (23/23), 11.77 KiB | 325.00 KiB/s, done.
From github.com:fossas/fossa-action
 * [new ref]         refs/pull/53/head -> dylmye/main
Switched to branch 'dylmye/main'

; sha256 dist/index.js
SHA256 (dist/index.js) = 7246e326dee613d6e3bdffc2440cdd0ff978821f207fc13b6c111ed9ea4cbd4f

; yarn run build
yarn run v1.22.22
$ ncc build src/index.ts -o dist --source-map --license LICENSE --minify
ncc: Version 0.38.1
ncc: Compiling file index.js into CJS
ncc: Using [email protected] (local user-provided)
  10kB  dist/LICENSE
  40kB  dist/sourcemap-register.js
 531kB  dist/index.js
1536kB  dist/index.js.map
1536kB  dist/index.js.map
2117kB  [1705ms] - ncc 0.38.1
✨  Done in 1.80s.

; sha256 dist/index.js
SHA256 (dist/index.js) = 7246e326dee613d6e3bdffc2440cdd0ff978821f207fc13b6c111ed9ea4cbd4f

Change lgtm, thanks @dylmye for adding this!

@dylmye
Copy link
Contributor Author

dylmye commented Jan 15, 2025

Thank you!! I don't have write access so can't merge

@jssblck
Copy link
Member

jssblck commented Jan 22, 2025

Thank you!! I don't have write access so can't merge

Oh, right. I'll take care of this. Thanks!

@jssblck jssblck merged commit 6eb50db into fossas:main Jan 22, 2025
1 check failed
@jssblck jssblck mentioned this pull request Jan 22, 2025
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants