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

chore: Add Branch Deletion to GitHub Actions Pipeline for Issue #1084

Closed
wants to merge 1 commit into from

Conversation

ayushontop
Copy link

@ayushontop ayushontop commented Nov 7, 2024

This pull request implements automatic branch deletion as part of the GitHub Actions pipeline to address issue #743 This feature ensures that the specified branch is deleted after each successful build or release, helping to keep the repository clean and preventing repository size increase over time.

Feature Overview:
Branch Deletion:
Deletes the specified branch after each run to avoid clutter and manage repository size effectively.
Configured to run as a final job in the workflow.
Related Issue:
Closes #743

Summary by Sourcery

CI:

  • Implement automatic branch deletion in the GitHub Actions pipeline to remove the APK branch after each run, ensuring repository cleanliness and size management.

Copy link

sourcery-ai bot commented Nov 7, 2024

Reviewer's Guide by Sourcery

This PR streamlines the GitHub Actions workflow by implementing automatic branch deletion and simplifying the build process. The changes focus on optimizing the version update process, simplifying artifact handling, and adding a new job to clean up the APK branch after builds.

No diagrams generated as the changes look simple and do not need a visual representation.

File-Level Changes

Change Details Files
Simplified version update process in the common workflow
  • Consolidated version name and code updates into more concise commands
  • Simplified git commit message for version updates
  • Improved code organization with clear section comments
.github/workflows/push.yml
Streamlined APK/AAB artifact handling
  • Removed redundant artifact upload steps
  • Simplified file copying and renaming logic
  • Improved branch cleanup process
  • Standardized naming convention for build artifacts
.github/workflows/push.yml
Removed unnecessary workflow steps and jobs
  • Removed Ruby setup and bundler configuration
  • Removed iOS build job
  • Removed screenshot generation job
  • Removed release draft update job
.github/workflows/push.yml
Added automatic APK branch deletion
  • Created new delete-apk-branch job
  • Configured job to run after android build
  • Added force deletion of APK branch
  • Implemented always() condition to ensure cleanup
.github/workflows/push.yml

Assessment against linked issues

Issue Objective Addressed Explanation
#743 Implement automatic APK generation using Github Actions
#743 Delete the apk branch on each new generation

Possibly linked issues


Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time. You can also use
    this command to specify where the summary should be inserted.

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

Copy link

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

Hey @ayushontop - I've reviewed your changes - here's some feedback:

Overall Comments:

  • The PR title and description focus on branch deletion but include significant unrelated changes. Please update the title and description to accurately reflect all changes being made.
  • The removal of the iOS build and screenshots jobs needs to be explained in the PR description. If these are intentional changes, please provide the rationale.
Here's what I looked at during the review
  • 🟢 General issues: all looks good
  • 🟢 Security: all looks good
  • 🟢 Testing: all looks good
  • 🟢 Complexity: all looks good
  • 🟢 Documentation: all looks good

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@ayushontop
Copy link
Author

Hi @adityastic can you please review this PR, Thanks, please let me know if there are any changes to be made

@adityastic
Copy link
Collaborator

Hey 👋, I don't think we need to remove the apk branch. What is the concern atm? Once we update HEAD by force pushing, the tree ref would not point to the last commits meaning those commits won't be pulled while fetching or updating apk branch in your local repo anyway

@adityastic
Copy link
Collaborator

Feel free to comment and let's discuss if we need to reopen this pr

@adityastic adityastic closed this Nov 8, 2024
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.

Write Basic Pipeline in Github Actions
2 participants