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

Automatically exec js commands #366

Merged
merged 11 commits into from
Jul 30, 2024
Merged

Automatically exec js commands #366

merged 11 commits into from
Jul 30, 2024

Conversation

gagdiez
Copy link
Contributor

@gagdiez gagdiez commented Jul 13, 2024

This PR tries to automatically execute the CLI commands that are suggested after somebody tries to run a JS commands.

I will put is as a draft for now, since my initially proposed code might be very wrong.

If the core devs feel it would be faster for them to code this instead of reviewing my code, please feel free to close this PR.

@race-of-sloths

@gagdiez gagdiez requested a review from frol July 13, 2024 23:03
@gagdiez gagdiez marked this pull request as draft July 13, 2024 23:03
@gagdiez gagdiez linked an issue Jul 13, 2024 that may be closed by this pull request
src/main.rs Outdated Show resolved Hide resolved
src/main.rs Show resolved Hide resolved
@gagdiez gagdiez changed the title WIP: JS command execute Automatically exec js commands Jul 24, 2024
@gagdiez gagdiez marked this pull request as ready for review July 24, 2024 11:49
@gagdiez
Copy link
Contributor Author

gagdiez commented Jul 25, 2024

@frol this is ready for a second review

Copy link
Collaborator

@frol frol left a comment

Choose a reason for hiding this comment

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

@gagdiez I noticed a minor bug with call (and probably view) command:

image

In JS CLI it was totally fine to skip arguments. Let's use text-args instead of json-args OR pass {} instead of an empty string to json-args.

src/js_command_match/mod.rs Show resolved Hide resolved
@gagdiez
Copy link
Contributor Author

gagdiez commented Jul 30, 2024

@frol fixed the view and call by always using json-args and having as default {}

Copy link
Collaborator

@frol frol left a comment

Choose a reason for hiding this comment

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

@race-of-sloths score 8

@race-of-sloths
Copy link

race-of-sloths commented Jul 30, 2024

@gagdiez Thank you for your contribution! Your pull request is now a part of the Race of Sloths!
New Sloth joined the Race! Welcome!

Shows profile picture for the author of the PR

Current status: executed
Reviewer Score
@frol 8

The average score is 8

@gagdiez check out your results on the Race of Sloths Leaderboard! and in the profile

What is the Race of Sloths

Race of Sloths is a friendly competition where you can participate in challenges and compete with other open-source contributors within your normal workflow

For contributors:

  • Tag @race-of-sloths inside your pull requests
  • Wait for the maintainer to review and score your pull request
  • Check out your position in the Leaderboard
  • Keep weekly and monthly streaks to reach higher positions
  • Boast your contributions with a dynamic picture of your Profile

For maintainers:

  • Score pull requests that participate in the Race of Sloths
  • Engage contributors with fair scoring and fast responses so they keep their streaks
  • Promote the Race to the point where the Race starts promoting you
  • Grow the community of your contributors

Feel free to check our website for additional details!

Bot commands
  • For contributors
    • Include a PR: @race-of-sloths include to enter the Race with your PR
  • For maintainers:
    • Assign points: @race-of-sloths score [1/2/3/5/8/13] to award points based on your assessment.
    • Reject this PR: @race-of-sloths exclude to send this PR back to the drawing board.
    • Exclude repo: @race-of-sloths pause to stop bot activity in this repo until @race-of-sloths unpause command is called

@race-of-sloths
Copy link

🌟 Score recorded!

@frol, thank you for scoring this pull request in the Race of Sloths!

@frol frol enabled auto-merge (squash) July 30, 2024 12:01
@frol frol merged commit 3a4a1cf into near:main Jul 30, 2024
7 checks passed
@frol frol mentioned this pull request Jul 27, 2024
frol added a commit that referenced this pull request Jul 30, 2024
## 🤖 New release
* `near-cli-rs`: 0.12.0 -> 0.13.0

<details><summary><i><b>Changelog</b></i></summary><p>

<blockquote>

##
[0.13.0](v0.12.0...v0.13.0)
- 2024-07-30

### Added
- Automatically exec legacy JS CLI commands for full backward
compatibility ([#366](#366))
- Added the ability to use the TEACH-ME mode
([#360](#360))
- Added a new subcommand to edit configuration parameters
([#367](#367))

### Fixed
- Fixed the fallback implementation of fetching active staking pools
([#369](#369))

### Other
- Fixed typos in user prompts and the guide
([#372](#372))
</blockquote>


</p></details>

---
This PR was generated with
[release-plz](https://github.com/MarcoIeni/release-plz/).
@race-of-sloths
Copy link

✅ PR is finalized!

Your contribution is much appreciated with a final score of 8!
You have received 80 Sloth points for this contribution

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.

Automatically execute suggested command for JS commands
3 participants