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

feat: Implement New Attributions Update Workflow via GitHub Actions #24390

Merged
merged 71 commits into from
Jun 5, 2024

Conversation

cryptodev-2s
Copy link
Contributor

@cryptodev-2s cryptodev-2s commented May 6, 2024

Description

This pull request introduces a GitHub Action workflow dedicated to managing attributions effectively within our project. The key components of this new workflow include:

  • Local Scripts for Attributions Management:
    • yarn attributions:generate: Updates attributions to reflect current dependencies.
    • yarn attributions:check: Checks if attributions are up-to-date with the latest changes.
  • GitHub Actions:
    • A check to ensure attributions are up-to-date on all pull requests.
    • An action that allows team members to update attributions directly by commenting @metamskbot update-attributions on any PR.

Related issues

Fixes: #1947

Manual testing steps

Locally

  • Run yarn attributions:generate to update the attributions file.
  • Run yarn attributions:check to ensure all attributions are current.

On GitHub (CI/PR)

  • Open and push changes to a PR.
  • Intentionally remove an entry from attribution.txt to simulate an error.
  • Observe that CI fails due to missing attributions.
  • Comment @metmaskbot update-attributions on the PR.
  • A bot will respond with a thumbs up, followed by a comment indicating whether the attributions were successfully updated.

For a practical demonstration, refer to the pull request in my fork: PR Demonstration

Note

This functionality is currently operational only on a fork as it depends on the integration of the bot action into the develop branch.

Screenshots/Recordings

Pre-merge author checklist

Pre-merge author checklist

  • I’ve followed MetaMask Coding Standards.
  • I've completed the PR template to the best of my ability
  • I’ve included tests if applicable
  • I’ve documented my code using JSDoc format if applicable
  • I’ve applied the right labels on the PR (see labeling guidelines). Not required for external contributors.

Pre-merge reviewer checklist

  • I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed).
  • I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots.

@cryptodev-2s cryptodev-2s requested review from kumavis and a team as code owners May 6, 2024 14:36
@cryptodev-2s cryptodev-2s marked this pull request as draft May 6, 2024 14:36
Copy link
Contributor

github-actions bot commented May 6, 2024

CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes.

@metamaskbot metamaskbot added the INVALID-PR-TEMPLATE PR's body doesn't match template label May 6, 2024
Copy link

socket-security bot commented May 6, 2024

@metamaskbot metamaskbot removed the INVALID-PR-TEMPLATE PR's body doesn't match template label May 6, 2024
@cryptodev-2s cryptodev-2s added team-wallet-framework type-bug Sev3-low Low severity; minimal to no impact upon users area-documentation Issues relating to documentation, in the codebase and off. labels May 6, 2024
@cryptodev-2s
Copy link
Contributor Author

@metamaskbot update-attributions

Copy link

socket-security bot commented May 7, 2024

👍 Dependency issues cleared. Learn more about Socket for GitHub ↗︎

This PR previously contained dependency changes with security issues that have been resolved, removed, or ignored.

Ignoring: npm/[email protected]

View full report↗︎

Next steps

Take a deeper look at the dependency

Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support [AT] socket [DOT] dev.

Remove the package

If you happen to install a dependency that Socket reports as Known Malware you should immediately remove it and select a different dependency. For other alert types, you may may wish to investigate alternative packages or consider if there are other ways to mitigate the specific risk posed by the dependency.

Mark a package as acceptable risk

To ignore an alert, reply with a comment starting with @SocketSecurity ignore followed by a space separated list of ecosystem/package-name@version specifiers. e.g. @SocketSecurity ignore npm/[email protected] or ignore all packages with @SocketSecurity ignore-all

@cryptodev-2s
Copy link
Contributor Author

@metamaskbot update-attributions

@cryptodev-2s cryptodev-2s marked this pull request as ready for review May 7, 2024 15:02
@cryptodev-2s
Copy link
Contributor Author

@metamaskbot update-attributions

@cryptodev-2s cryptodev-2s force-pushed the fix/attributions branch 3 times, most recently from e540fd0 to 908bb16 Compare May 9, 2024 13:44
@cryptodev-2s
Copy link
Contributor Author

@metamaskbot update-policies

@metamaskbot
Copy link
Collaborator

Policies updated

@cryptodev-2s cryptodev-2s requested review from a team as code owners May 9, 2024 14:01
@cryptodev-2s
Copy link
Contributor Author

@metamaskbot update-policies

@metamaskbot
Copy link
Collaborator

Policies updated

@cryptodev-2s
Copy link
Contributor Author

@metamaskbot update-attributions

@cryptodev-2s cryptodev-2s changed the title feat: add new attributions workflow feat: Implement New Attributions Update Workflow via GitHub Actions May 9, 2024
@cryptodev-2s
Copy link
Contributor Author

Currently Lint rule runs on every PR(create, update) once this PR is approved. I will switch the github action to run only on release branches.

@cryptodev-2s cryptodev-2s requested a review from mcmire June 4, 2024 16:14
@metamaskbot
Copy link
Collaborator

Builds ready [03146ea]
Page Load Metrics (205 ± 213 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint7612693126
domContentLoaded9221232
load431685205443213
domInteractive9221232
Bundle size diffs
  • background: 0 Bytes (0.00%)
  • ui: 38 Bytes (0.00%)
  • common: 0 Bytes (0.00%)

Copy link
Contributor

@mcmire mcmire left a comment

Choose a reason for hiding this comment

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

I had two minor suggestions, but this otherwise looks good to me.

.github/workflows/check-attributions.yml Outdated Show resolved Hide resolved
development/attributions-check.sh Outdated Show resolved Hide resolved
@metamaskbot
Copy link
Collaborator

Builds ready [9808d4b]
Page Load Metrics (46 ± 3 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint68987973
domContentLoaded811910
load41674653
domInteractive811910
Bundle size diffs
  • background: 0 Bytes (0.00%)
  • ui: 48 Bytes (0.00%)
  • common: 0 Bytes (0.00%)

@cryptodev-2s cryptodev-2s requested a review from mcmire June 4, 2024 18:38
@metamaskbot
Copy link
Collaborator

Builds ready [ed9b467]
Page Load Metrics (51 ± 3 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint6610581105
domContentLoaded9261242
load42665173
domInteractive9261242
Bundle size diffs
  • background: 0 Bytes (0.00%)
  • ui: 48 Bytes (0.00%)
  • common: 0 Bytes (0.00%)

@cryptodev-2s cryptodev-2s requested a review from mcmire June 4, 2024 20:44
@metamaskbot
Copy link
Collaborator

Builds ready [66a7d54]
Page Load Metrics (48 ± 5 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint6510380105
domContentLoaded8291142
load418448105
domInteractive8291142
Bundle size diffs
  • background: 0 Bytes (0.00%)
  • ui: 48 Bytes (0.00%)
  • common: 0 Bytes (0.00%)

@metamaskbot
Copy link
Collaborator

Builds ready [c4b6d02]
Page Load Metrics (177 ± 182 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint711068794
domContentLoaded8201131
load401325177379182
domInteractive8201131
Bundle size diffs
  • background: 0 Bytes (0.00%)
  • ui: 48 Bytes (0.00%)
  • common: 0 Bytes (0.00%)

@metamaskbot
Copy link
Collaborator

Builds ready [23ddf2c]
Page Load Metrics (129 ± 159 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint7013088136
domContentLoaded9221131
load441572129331159
domInteractive9221131
Bundle size diffs
  • background: 0 Bytes (0.00%)
  • ui: 48 Bytes (0.00%)
  • common: 0 Bytes (0.00%)

@cryptodev-2s
Copy link
Contributor Author

@SocketSecurity ignore npm/[email protected]

@cryptodev-2s cryptodev-2s merged commit 1763040 into develop Jun 5, 2024
77 checks passed
@cryptodev-2s cryptodev-2s deleted the fix/attributions branch June 5, 2024 20:00
@github-actions github-actions bot locked and limited conversation to collaborators Jun 5, 2024
@gauthierpetetin gauthierpetetin added the release-12.0.0 Issue or pull request that will be included in release 12.0.0 label Jun 6, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-documentation Issues relating to documentation, in the codebase and off. release-12.0.0 Issue or pull request that will be included in release 12.0.0 Sev3-low Low severity; minimal to no impact upon users team-wallet-framework type-bug
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

6 participants