-
-
Notifications
You must be signed in to change notification settings - Fork 597
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
Actions (#872) #939
Actions (#872) #939
Conversation
0612c92
to
c81fadb
Compare
Thanks for working on this @lexor! Let me know when it's ready for review 🚢 |
What's missing from the developer.github.com documentation is e.g. dispatching: I've been successful with: /**
* @link https://docs.github.com/en/free-pro-team@latest/rest/reference/actions#create-a-workflow-dispatch-event
*
* @param string $username
* @param string $repository
* @param string $workflowId
* @param string $ref
* @param array $inputs
*
* @return array|string
*/
public function dispatches(string $username, string $repository, string $workflowId, string $ref, array $inputs = [])
{
$parameters = array('ref' => $ref, 'inputs' => $inputs);
return $this->post('/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/actions/workflows/'.rawurlencode($workflowId).'/dispatches', $parameters);
} Another note: |
Thanks for sharing the I'm not add organization endpoints (self-hosted runners) because marked on documentation. Organization endpoints currently in public beta and can be change.
I think it can be changed from |
16e1d6d
to
4f25590
Compare
Hey @acrobat. This pull request awaiting review. |
For Get a workflow for example the docs write:
So, yeah I guess a string parameter named just workflow would make sense here. |
@fodinabor the repo dispatch api endpoint is already added in #931 @lexor A general remark before I do a full review, can you update the doc links to directly link to the new documentation? Example: https://docs.github.com/en/free-pro-team@latest/rest/reference/actions |
4f25590
to
11fa492
Compare
Done, I updated 👍 |
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.
This comment is also applicable to all occurences of non-query parameters
Can you replace the non url parameters with a
array $params/parameters
, so our code isn't fixed on a certain set of parameters of github decides to add new options.
Can you also add a docs entry for the added endpoints? The rest of PR looks good 👌
11fa492
to
698918d
Compare
feat(actions): added self-hosted runners Signed-off-by: Emre DEĞER <ben@emre.dev> repo: added actions feat(actions): added self-hosted runners Signed-off-by: Emre DEĞER <ben@emre.dev> repo: added actions refactored fix(actions: reformated self-hosted runners repo: added actions refactored fix(actions: reformated self-hosted runners feat(actions): added repo's secrets Signed-off-by: Emre DEĞER <ben@emre.dev> feat(actions): added organization's secrets Signed-off-by: Emre DEĞER <ben@emre.dev> feat(actions): formated Signed-off-by: Emre DEĞER <ben@emre.dev> docs(actions): updated php doc blocks updated `@link` for new docs Signed-off-by: Emre DEĞER <ben@emre.dev> feat(actions): updated for requested changes Signed-off-by: Emre DEĞER <ben@emre.dev> feat(actions): added docs Signed-off-by: Emre DEĞER <ben@emre.dev> feat(actions): updated download example cases Signed-off-by: Emre DEĞER <ben@emre.dev> fix(actions): removed todos Signed-off-by: Emre DEĞER <ben@emre.dev>
c5933b1
to
703955e
Compare
Sure, replaced. Now non url parameters moved on
I updated functions and test cases. Also added docs for added endpoints. |
Thanks @lexor! And congrats on your first contribution! 🎉 |
This PR was merged into the 3.0.x-dev branch. Discussion ---------- Adds the workflow dispatch proposed in #939. This is different from the repository dispatch, as here it is clear what arguments to use, so that this is much more convenient to use. Also update docs link. Commits ------- 61366b2 Add workflow dispatch and allow workflow names.
What I am missing is the enable of a specific workflow |
Looks like endpoint was added or I missed it. I can create pull request for enable/disable endpoints. |
Yeah, might be new. $url = 'repos/' . rawurlencode($organization) . '/' . rawurlencode($repository) . '/actions/workflows/' . (string)$id . '/enable';
$this->post($url); But it returns Not Found The dispatches() example above works, which makes this even weirder. |
Documentation: https://developer.github.com/v3/actions/