devops-actions / load-used-actions

Load used actions from an entire organization
12 stars 8 forks source link

Add an Action input to include/exclude archived repositories #117

Open sebastienvermeille opened 2 months ago

sebastienvermeille commented 2 months ago

Hi @rajbos,

The feature idea

Add a new input to load-used-actions called: include-archived-repositories Default value: true <-- preserve existing behaviour Required: false <-- preserve existing behaviour

When set to false, the load-used-actions should only report actions usage for repositories not archived.

A bit of context: why do I need that?

I am using load-used-actions to report the global usage of GitHub actions within an organization and report it to Datadog. That way I am able to monitor a bit what is happening, which repo use outdated versions, etc.

The issue is that archived repositories are also reported and I don't want them to be reported.

When a repository is archived, its workflows are not triggerable anymore (Actions are disabled).

This is why I challenge this, I understand we should keep retro compatibility for existing uses, however, we could provide that feature which shouldn't be a big deal and comes with a few advantages:

1) More valuable data filtered directly 2) Faster execution (= less GitHub Actions minutes consumption :+1: ) 3) No change for existing users

What do you think?

If you agree, I would like to offer my contribution to this.

Best

rajbos commented 3 weeks ago

@sebastienvermeille, sounds like a good plan. Let's also include it in the output as an extra field next to repo.

I understand that you do not want to see them, but I am also thinking of the use case that at any point in time the repo could be unarchived and then you want to potentially see those old dependencies (if you use the output of the action for that).

Let's add the input and output for this, and then I think we can flip the default with a new major release (as that is a breaking change IMO).