Skip to content

Conversation

@niieani
Copy link

@niieani niieani commented Oct 5, 2024

For the purposes of releasing, it is useful to just get the information of the packages that are about to be released.
If only: 'list-candidate-releases' is set, only output information about which packages would be released.

It provides releases_pending and paths_to_release as the outputs.

In order to enable this new feature, I've added a new input called only that allows running only the desired functionality ('create-github-releases' | 'list-candidate-releases' | 'update-pull-requests').
It is not a breaking change, and is backwards compatible with the skipGitHubRelease and skipGitHubPullRequest inputs.

@niieani
Copy link
Author

niieani commented Dec 5, 2024

Hi @chingor13! I know you must be busy. Any chance you could have a look at this? I'm open to feedback if you want any changes.
It would be really great if we could land a way to only output releases.

🙇

@le-yams
Copy link

le-yams commented Feb 25, 2025

Hi @niieani ,

I would be interested to also have a list-pull-requests feature for the only parameter.

Something like:

export async function main() {
  ...
  if (inputs.only === 'list-pull-requests') {
    core.debug('Listing pending pull requests');
    outputCandidatePRs(await manifest.buildPullRequests());
  }
  ...
}
...
function outputCandidatePRs(prs: ReleasePullRequest[]) {
  prs = prs.filter(pr => pr !== undefined);
  core.setOutput('prs_pending', prs.length > 0);
  if (prs.length) {
    core.setOutput('pr', prs[0]);
    core.setOutput('prs', JSON.stringify(prs));
  }
}

So in this case the pr and prs output would be of type ReleasePullRequest object instead of PullRequest object.

What do you think about it?
🙇

@niieani
Copy link
Author

niieani commented Feb 26, 2025

Hi @le-yams ! I think that's a good addition, however note that I've been trying to get this merged since October 2024.
I do hope @chingor13 can see this at some point in time, and review / give feedback / merge.
If you want to create a fork+commit your change, I can push it into this PR.

Copy link
Contributor

@chingor13 chingor13 left a comment

Choose a reason for hiding this comment

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

Thanks for this.

I think I'd prefer a dry-run boolean option to mirror what the CLI does rather than maintaining a list of actions.

@niieani
Copy link
Author

niieani commented Mar 12, 2025

Thank you for taking a look @chingor13.
Made the necessary changes and added PR dry-run too based on @le-yams's suggestion.

@niieani
Copy link
Author

niieani commented May 23, 2025

Sorry to ping you - I was wondering if there's any chance for a merge&release given the code updated based on your review? 🙇 Much appreciated!

@abhisheksr01
Copy link

Sorry to ping you - I was wondering if there's any chance for a merge&release given the code updated based on your review? 🙇 Much appreciated!

I am also awating this feature for a while specially listing the release candidates, @chingor13 could you please re-review this PR?

@yafanasiev

This comment was marked as off-topic.

@ferrarimarco
Copy link
Collaborator

@niieani thanks for this PR. Can you please rebase your branch against the latest main, please?

adds ability to output candidate releases, and candidate PRs without actually releasing or updating PRs
@niieani
Copy link
Author

niieani commented Nov 28, 2025

@ferrarimarco rebased!

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.

6 participants