Uh oh!
There was an error while loading. Please reload this page.
Actions (#872) - #939
Conversation
0612c92 to
c81fadbCompareacrobat
commented
Nov 26, 2020
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 */publicfunctiondispatches(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
4f25590Comparelexor
commented
Nov 28, 2020
Hey @acrobat. This pull request awaiting review. |
fodinabor
commented
Nov 28, 2020
For Get a workflow for example the docs write:
So, yeah I guess a string parameter named just workflow would make sense here. |
acrobat
commented
Nov 29, 2020
@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
11fa492Compare
Done, I updated 👍 |
acrobat
left a comment
There was a problem hiding this comment.
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 👌
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
11fa492 to
698918dComparefeat(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
703955eComparelexor
commented
Nov 30, 2020
Sure, replaced. Now non url parameters moved on
I updated functions and test cases. Also added docs for added endpoints. |
acrobat
commented
Dec 3, 2020
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.
dereuromark
commented
Apr 14, 2021
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/