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 PR number to output when triggered by push #13

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

teleological
Copy link
Contributor

@teleological teleological commented Nov 8, 2019

It might be desirable to output the pull number when handling other triggers, but I wasn't sure what would be useful in the case of check_run, when multiple PRs might be merged, so I kept my change narrow.


View rendered README.md

@ghost
Copy link

ghost commented Nov 8, 2019

DeepCode Report (#d6a2c7)

DeepCode analyzed this pull request.
There are no new issues.

Comment on lines +77 to +78
When triggered by a push event, the pull request number which is created or found to
already exist is stored in the `pull-request` output variable.
Copy link
Owner

Choose a reason for hiding this comment

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

Please don't break markdown lines like that. If you're bothered by the horizontal scrollbar, consider activating the word wrap in your text editor (ALT+Z, if you're using VSCode 🙂).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

My editor did this without me noticing. Will correct.

@@ -133,6 +133,7 @@ async function push() {
core.info(`Label ${label} added to #${pull_number}.`);
core.debug(JSON.stringify(labelsResponse.data));
}
core.setOutput("pull-request", pull_number.toString());
Copy link
Owner

Choose a reason for hiding this comment

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

I think we're supposed to add this to the action.yml file. Check out the documentation.

@Logerfo
Copy link
Owner

Logerfo commented Nov 8, 2019

Thanks for the PR. Did you find yourself any useful workflow using the new output?
About the multiple PRs, what do you think about returning comma separated ids? It's a shame that return an array is not supported...

@Logerfo Logerfo added the enhancement New feature or request label Nov 8, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request size/XS
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants