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

Add a new pr-number input #411

Closed
wants to merge 1 commit into from
Closed

Conversation

Andarist
Copy link

@Andarist Andarist commented Aug 2, 2022

Motivation

It's useful when a previous step/job in a workflow creates a PR, or in general when the workflow is executed in the context of a different event (could be a repository dispatch or just anything) and when the PR number might come from an arbitrary source.

I had a feature request to add labels input to the https://github.com/changesets/action (this action creates/updates a PR) but I think that it would be much better to achieve this through composition. It seems to me that people who needs it could use the output of my action as input to this one.

@pje
Copy link
Member

pje commented Sep 7, 2022

Thanks for your contribution, @Andarist!

This is exactly the kind of PR I love to see:

  • flexible, clear use-case
  • limited in scope
  • has tests
  • updates documentation

Please fix the conflicts in dist/index.js (by regenerating it) and I'm happy to merge.

@Andarist
Copy link
Author

Andarist commented Sep 7, 2022

@pje done

@Andarist
Copy link
Author

Andarist commented Dec 6, 2022

@pje I've rebased this again - would you find some time to land this?

@shaunofneuron
Copy link

I'm pretty sure others will figure out how to run this manually using the gh cli but it would be helpful once merged if there were some future guide/doc on how to trigger with this new parameter? Perhaps something like?

echo '{"pull_request":1234}' | gh workflow run labeler.yaml --json

I came here because I was looking to trigger against PR's that need labels, even adding in the workflow_dispatch trigger so do so. Then I realized this wasn't possible since "PR" is only derived from the context.

@AndreiLobanovich AndreiLobanovich self-assigned this Jun 21, 2023
@MaksimZhukov
Copy link
Contributor

Hello @Andarist! Thank you for your willingness to contribute and improve the action!
There is a pull request that was opened before yours, and we are going to accept it.
I'm closing it as a duplicate.

@MaksimZhukov MaksimZhukov added the duplicate This issue or pull request already exists label Jun 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants