-
-
Notifications
You must be signed in to change notification settings - Fork 439
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
Determine if a new PR was created #698
Comments
Hi @sheurich I've avoided adding this up to now because it is not quite as easy at it appears to implement. Firstly, the action handles create/update/delete of the git branch, and the create/update of the pull request on GitHub's API. So what use cases like yours are interested in is presumably a combination of these states. Secondly, there is the problem of what counts as "updated." For the update of the PR on GitHub's API the action doesn't check the current state of the title, body, labels, etc., it just sends a If would be helpful if you could explain what subsequent non-idempotent step you are planning to run. |
👋🏽 @peter-evans I want to notify an external system, e.g. using the Jira API to create a ticket, only when a PR is created or updated. One use-case might be tracking an upstream repository and updating a fork using the c-p-r action. Running this on a timed basis should create a ticket for a person to review the PR when created or when updated with additional upstream changes. |
Would it work for you if the action returned an output with one of following values?
|
Your proposed change would fix my issue perfectly. Thanks! |
Released as |
Subject of the issue
I would like to inform the next step in the workflow whether create-pull-request created a new PR, updated an existing PR or (successfully) did nothing. Ideally this would be implemented as an output from the action step.
This could be used e.g. by a subsequent non-idempotent step which should only run when a new PR has been created.
Steps to reproduce
The current set of outputs do not provide enough information about the action status; the
pull-request-number
andpull-request-url
outputs are the same regardless of new, update or no-op activity.The text was updated successfully, but these errors were encountered: