Skip to content

Add function matbox.git.deleteGitTag#13

Open
ehennestad wants to merge 5 commits intomainfrom
x/add/delete-git-tag-function
Open

Add function matbox.git.deleteGitTag#13
ehennestad wants to merge 5 commits intomainfrom
x/add/delete-git-tag-function

Conversation

@ehennestad
Copy link
Copy Markdown
Owner

@ehennestad ehennestad commented Nov 24, 2024

Add convenience function for deleting git tags in repo

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Nov 24, 2024

Test Results

19 tests   19 ✅  12s ⏱️
 5 suites   0 💤
 1 files     0 ❌

Results for commit b838b09.

♻️ This comment has been updated with latest results.

@codecov
Copy link
Copy Markdown

codecov bot commented Nov 24, 2024

Codecov Report

Attention: Patch coverage is 0% with 11 lines in your changes missing coverage. Please review.

Project coverage is 41.26%. Comparing base (b323a59) to head (b838b09).
Report is 4 commits behind head on main.

Files with missing lines Patch % Lines
code/+matbox/+git/deleteGitTag.m 0.00% 11 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #13      +/-   ##
==========================================
+ Coverage   41.11%   41.26%   +0.15%     
==========================================
  Files          53       54       +1     
  Lines        1182     1214      +32     
==========================================
+ Hits          486      501      +15     
- Misses        696      713      +17     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds a new matbox.git convenience utility to delete Git tags and updates the CI workflow checkout behavior to use the triggering branch/ref.

Changes:

  • Introduce matbox.git.deleteGitTag to delete a tag locally and on origin.
  • Update .github/workflows/update.yml to checkout a specific ref and print the checked-out branch name.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.

File Description
code/+matbox/+git/deleteGitTag.m New MATLAB helper that runs git tag --delete and git push --delete in a target repo directory.
.github/workflows/update.yml Adjusts checkout ref selection and adds a step to log which branch was checked out.

You can also share your feedback on Copilot code review. Take the survey.


if ~strcmp(pwd, projectDirectory)
currentWorkingDir = pwd;
cleanupObj = onCleanup(@(fn) cd(currentWorkingDir));
Comment on lines +16 to +17
%[s,m] = system( '$(git rev-parse --abbrev-ref HEAD) == "main"' )

Comment on lines +18 to +22
[s1, m1] = system(sprintf("git tag --delete %s", tagName));
assert(s1==0, 'MATBOX:GitUtility:DeleteTagFailed', ...
'Failed to delete local tag. Reason: %s', m1);

[s2, m2] = system(sprintf("git push --delete origin %s", tagName));
- name: Check out repo
uses: actions/checkout@v4
with:
ref: ${{ github.event_name == 'pull_request' && github.head_ref || github.ref_name }}
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.

2 participants