feat: add team label reusable workflow #23
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Instead of copy-pasting the implementation of add-team-label to other repositories, such as metamask-extension and metamask-mobile, it should be possible to call the workflow directly from the github-tools repository, if we make it a reusable workflow. This is great, because if we make a change to the workflow in the github-tools repository, the changes propagate to other repositories as well.
More information about reusable workflows: https://docs.github.com/en/actions/using-workflows/reusing-workflows
This kind of aligns with MetaMask/metamask-extension#25509, but not exactly. The shared library would still be needed nevertheless, as this is only sharing the workflow definition, but not the scripts that are run during the workflow. The scripts still need to exist in all the repositories (for now). Ideally, we would make the shared library an npm package that can be installed in the different repositories to allow for the sharing of scripts.
Resolves: https://github.com/MetaMask/MetaMask-planning/issues/2760