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

Bump version workflow #881

Merged
merged 10 commits into from
Dec 5, 2023
Merged

Bump version workflow #881

merged 10 commits into from
Dec 5, 2023

Conversation

goastler
Copy link
Member

@goastler goastler commented Dec 5, 2023

fixes prosopo/captcha-private#751

blocked by #878

@goastler
Copy link
Member Author

goastler commented Dec 5, 2023

blocked by #878

Copy link
Contributor

github-actions bot commented Dec 5, 2023

⏳ Blocked by: * #878.
🔔 I'll update this comment when the blocking issues/PRs are closed.
💭 From Dependent Issues (:robot:)

Copy link

Pull Request Review Markdown

Hey there! 👋 I've summarized the previous results for you. Here's a markdown document for your pull request review:

Changes

  1. Update the name of the workflow from npm_publish to bump_version. 🔄

Suggestions

  1. In the publish job, there are some unnecessary ls -la commands. They don't seem to serve any purpose and can be removed. 🗑️
  2. In the publish job, the npm run build:all:cjs command is missing. It should be added after the npm run build -w @prosopo/scripts command. 🛠️

Bugs

  1. In the publish job, there are some potential issues with file paths. The following lines may need to be updated to correct file paths:
    • ls -la ~/.cache/Cypress || true
    • ls -la protocol/cargo-cache || true
    • ls -la protocol/target/ink || true
    • ls -la node_modules || true 🐛

Improvements

  1. In the publish job, the version bumping process can be refactored for better readability. Here's an improved code snippet:
    # make a new branch for the version changes
    git switch -c bump-version-${{ github.event.inputs.version }}
    
    # make the version changes
    npm run version ${{ github.event.inputs.version }}
    
    # commit the version changes
    git add .
    git commit -m "Bump version to ${{ github.event.inputs.version }}"
    
    # push version changes
    git push --set-upstream origin bump-version-${{ github.event.inputs.version }}
    
    # create a PR for the release
    ID=$(gh pr create --base main --title "Release ${{ github.event.inputs.version }}" --fill 2>&1 | grep http | xargs -n1 basename)
    
    # enable auto-merge via squash merge
    gh pr merge $ID --auto --squash
    Please note that you may need to install the gh command-line tool for this code snippet to work. 📝

Rating

The code has been rated 7.5 out of 10 based on the following criteria:

  • Readability: The code is generally readable, but there are some areas where it can be improved.
  • Performance: The code seems to be efficient as it only performs simple string operations.
  • Security: There are no obvious security vulnerabilities in the code. 🔒

That's it! Feel free to make any necessary changes based on the feedback provided. Good luck with your pull request! 🚀

P.S. Did you know we offer a premium plan that can analyze big pull requests? It's perfect for handling larger codebases. Just something to consider! 😉

@goastler goastler merged commit a1735eb into main Dec 5, 2023
4 checks passed
@goastler goastler deleted the bump_version_workflow branch December 5, 2023 14:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants