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 delete release branch after merge #30

Merged
merged 3 commits into from
Jan 28, 2025

Conversation

nwiltsie
Copy link
Member

Description

This is a little nicety that I'd like to slip in before bumping the major version (see #29). All this does is try to delete the release branch at the end of the release finalization workflow.

If the deletion fails (as in my example below where I deleted the branch manually) the workflow logs any error messages but does not fail.

Successful Deletion

PR: https://github.com/uclahs-cds/user-nwiltsie-pipeline/pull/50
Workflow logs: https://github.com/uclahs-cds/user-nwiltsie-pipeline/actions/runs/13015993703/job/36305213472#step:8:18

Deleted branch automation-create-release-2.3.1
SCR-20250128-ivpk

Unsuccessful Deletion

PR: https://github.com/uclahs-cds/user-nwiltsie-pipeline/pull/51
Workflow logs: https://github.com/uclahs-cds/user-nwiltsie-pipeline/actions/runs/13016071577/job/36305465966#step:8:180

Failed to delete branch automation-create-release-2.3.2
Stdout: {"message":"Reference does not exist","documentation_url":"https://docs.github.com/rest/git/refs#delete-a-reference","status":"422"}
Stderr: gh: Reference does not exist (HTTP 422)
SCR-20250128-ivuc

Closes #27

Checklist

  • This PR does NOT contain Protected Health Information (PHI). A repo may need to be deleted if such data is uploaded.
    Disclosing PHI is a major problem1 - Even a small leak can be costly2.

  • This PR does NOT contain germline genetic data3, RNA-Seq, DNA methylation, microbiome or other molecular data4.

  • This PR does NOT contain other non-plain text files, such as: compressed files, images (e.g. .png, .jpeg), .pdf, .RData, .xlsx, .doc, .ppt, or other output files.

  To automatically exclude such files using a .gitignore file, see here for example.

  • I have read the code review guidelines and the code review best practice on GitHub check-list.

  • I have set up or verified the main branch protection rule following the github standards before opening this pull request.

  • The name of the branch is meaningful and well formatted following the standards, using [AD_username (or 5 letters of AD if AD is too long)]-[brief_description_of_branch].

  • I have added the major changes included in this pull request to the CHANGELOG.md under the next release version or unreleased, and updated the date.

Footnotes

  1. UCLA Health reaches $7.5m settlement over 2015 breach of 4.5m patient records

  2. The average healthcare data breach costs $2.2 million, despite the majority of breaches releasing fewer than 500 records.

  3. Genetic information is considered PHI.
    Forensic assays can identify patients with as few as 21 SNPs

  4. RNA-Seq, DNA methylation, microbiome, or other molecular data can be used to predict genotypes (PHI) and reveal a patient's identity.

@nwiltsie nwiltsie requested a review from a team January 28, 2025 17:37
@nwiltsie
Copy link
Member Author

Just for my own sanity if I ever come back here - I changed the calling workflow to produce the tarball between these two runs: https://github.com/uclahs-cds/user-nwiltsie-pipeline/commit/1f9939c501c30da21355bc134160ca42fe27f7dc. It is totally expected that the PR messages look different.

Copy link

@yashpatel6 yashpatel6 left a comment

Choose a reason for hiding this comment

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

Looks good!

@nwiltsie nwiltsie merged commit 2035ab6 into main Jan 28, 2025
7 checks passed
@nwiltsie nwiltsie deleted the nwiltsie-delete-branch branch January 28, 2025 18:43
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.

Delete release branch after merging
2 participants