-
Notifications
You must be signed in to change notification settings - Fork 17
Implement draft release job #68
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
Merged
IgorDobryn
merged 1 commit into
main
from
implement-draft-release-workflow-for-mailtrap-php
Jul 9, 2026
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🩺 Stability & Availability | 🟠 Major | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
Repository: mailtrap/mailtrap-php
Length of output: 3764
🌐 Web query:
GitHub API releases/latest draft prerelease excluded no published release 404 compute-next-semver empty current input💡 Result:
The GitHub API endpoint GET /repos/{owner}/{repo}/releases/latest is designed to return the most recent non-prerelease, non-draft release [1][2][3]. If a repository has only draft or prerelease releases, or no releases at all, this endpoint will return a 404 Not Found error [2][4][5]. This occurs because the endpoint specifically ignores drafts and prereleases when determining the "latest" version [1][2][6]. Key behaviors and technical details: - Definition of Latest: The "latest" release is strictly defined as the most recent published full release, sorted by the created_at attribute [1][3]. - API 404: The 404 response is the standard behavior when the criteria for a "latest" release are not met [4]. While some official documentation may not explicitly list 404 as a potential response code, it is widely documented as the expected behavior for repositories lacking stable, published releases [4]. - Prerelease/Draft Exclusion: These release types are intentionally excluded from this specific endpoint [1][5]. They cannot be set as the "latest" release via the API's make_latest parameter [1][3]. - Handling 404s: Developers relying on this endpoint for automated tooling (like version resolvers) must implement handling for the 404 error, typically by falling back to listing all releases and manually parsing tags to find the latest available version [2][7]. For scenarios where you need to support prereleases or drafts, you should avoid /releases/latest and instead use the /repos/{owner}/{repo}/releases endpoint to list all releases and filter them programmatically [2].
Citations:
🌐 Web query:
railsware/github-actions compute-next-semver empty current input default initial version💡 Result:
The
railsware/github-actionsrepository contains a collection of utility actions [1], but there is no widely documented or specialized GitHub Action namedcompute-next-semverwithin that specific organization [2][3][1]. It is highly likely that the action you are referring to is a different project—such asMiguelRipoll23/get-next-version[4],mirceanton/action-semver-metadata[5], orlhstrh/action-repo-semver[6]—which are commonly used to compute semantic versions and handle initial version inputs. If you are encountering issues with "empty" inputs for initial versions in such GitHub Actions: 1. Handling of Empty Inputs: In GitHub Actions, if a workflow input is empty, it does not automatically revert to a default value unless the action logic explicitly checks for an empty string and applies a fallback [4][7]. 2. Default Behavior: Most well-designed semver actions (likemirceanton/action-semver-metadata[5] orlhstrh/action-repo-semver[6]) have explicit input fields (e.g.,default-version) to handle the case where no previous release exists. 3. Troubleshooting: - Verify the exact repository name you are using. - Check theaction.ymlfile of the specific action for an input parameter named something likedefault-initial-version,initial-version, ordefault-version[4][5][6]. - Ensure you are providing this input in your workflow if you do not want to rely on the hardcoded default (which is often0.0.0or1.0.0) [5][6]. If you are using a custom or private action, you may need to update its logic to check if the input is empty or null and provide a default accordingly [4].Citations:
🌐 Web query:
site:github.com/railsware/github-actions compute-next-semver action.yml current input default empty💡 Result:
Based on the provided search results, there is no widely recognized GitHub Action named exactly compute-next-semver. Several similar tools exist, such as allegro-actions/next-version [1], fabien-marty/github-next-semantic-version [2], and other CLI-based tools like git-semver [3] and next-ver [4]. In the context of GitHub Actions, inputs defined in an action.yml file that are left empty or omitted by the user behave according to the default value specified in the configuration. If a default is defined as an empty string or not provided, the input will hold an empty value within the action's execution environment. For example, in the documentation for github-next-semantic-version, specific options like --must-have-labels explicitly note that "empty => no filtering" [2]. If you are working with a specific custom action, you should check its action.yml file to see how the default property is defined for each input.
Citations:
Handle the no-published-release case in
draft-release.ymlGET /repos/$GITHUB_REPOSITORY/releases/latestreturns 404 until the repo has a published release, and this workflow only creates drafts. Seed an initial version or fall back cleanly here so the first draft release doesn’t fail.🤖 Prompt for AI Agents