Replies: 3 comments 2 replies
|
💬 Your Product Feedback Has Been Submitted 🎉 Thank you for taking the time to share your insights with us! Your feedback is invaluable as we build a better GitHub experience for all our users. Here's what you can expect moving forward ⏩
Where to look to see what's shipping 👀
What you can do in the meantime 💻
As a member of the GitHub community, your participation is essential. While we can't promise that every suggestion will be implemented, we want to emphasize that your feedback is instrumental in guiding our decisions and priorities. Thank you once again for your contribution to making GitHub even better! We're grateful for your ongoing support and collaboration in shaping the future of our platform. ⭐ |
Authenticating with a GitHub App on behalf of a userYour GitHub App can perform actions on behalf of a user, like creating an issue, posting a comment, or creating a deployment. Your app can make API requests on behalf of a user. API requests made by an app on behalf of a user will be attributed to that user. For example, if your app posts a comment on behalf of a user, the GitHub UI will show the user's avatar photo along with the app's identicon badge as the author of the issue. Similarly, if the request triggers a corresponding entry in the audit logs and security logs, the logs will list the user as the actor but will state that the "programmatic_access_type" is "GitHub App user-to-server token". To make an API request on behalf of a user, the user must authorize your app. If an app is installed on an organization that includes multiple members, each member will need to authorize the app before the app can act on their behalf. An app does not need to be installed in order for a user to authorize the app. When a user installs an app on an account, they grant the app permission to access the resources that it requested. During the installation process, they will also see a list of account permissions that the app can request for individual users. When a user authorizes an app, they grant the app permission to act on their behalf, and they grant the account permissions that the app requested. Once a user has authorized your app, you can generate a user access token, which is a type of OAuth token. You should send the user access token in the When operating on behalf of a user, your app's access is limited to ensure secure and appropriate access:
Requests made with a user access token are sometimes called "user-to-server" requests. A token has the same capabilities to access resources and perform actions on those resources that the owner of the token has, and is further limited by any scopes or permissions granted to the token. A token cannot grant additional access capabilities to a user. If you want to attribute app activity to the app instead of to a user, you should authenticate as an app installation instead. For more information, see Authenticating as a GitHub App installation. Note If a user reports that they cannot see resources owned by their organization after authorizing your GitHub App and the organization uses SAML SSO, instruct the user to start an active SAML session for their organization before reauthorizing. For more information, see SAML and GitHub Apps in the GitHub Enterprise Cloud documentation. |
|
that tooltip is telling the truth. with: ${{ fromJson(github.event.inputs) }}same for working pattern today - expand each input explicitly: # dispatch.yml
on:
workflow_dispatch:
inputs:
key:
required: true
type: string
submodules:
required: true
type: string
jobs:
dispatch:
uses: ./.github/workflows/common.yml
with:
key: ${{ inputs.key }}
submodules: ${{ inputs.submodules }}for if the set of keys is dynamic (you don’t know them at yaml-write time) you still can’t splat into
matrix so: +1 on the feature ask (StringToken → mapping would kill a ton of boilerplate). until then, explicit keys or a single json string input is the path that runs. |

Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
🏷️ Discussion Type
Bug
💬 Feature/Topic Area
Workflow Configuration
Discussion Details
When generating jobs programmatically, a JSON object/string can be declared in one job and then used to define a matrix in another job without explicitly unpacking all the keys and values.
The following is a (reusable) variation of https://docs.github.com/en/actions/how-tos/write-workflows/choose-what-workflows-do/run-job-variations#using-an-output-to-define-two-matrices:
However, the same strategy fails when trying to pass arguments to the Reusable Workflow.
The following is a simplified case that tries to reuse the inputs of a workflow_dispatch (which are exactly the same as the inputs of the workflow_call of the reusable workflow
common.yml).The following error is produced:
Similar results with
inputs(with or withoutfromJsonWhen editing the workflow in GitHub, the tooltip suggests that parsing JSON strings is not supported:
It would be really helpful if arguments to Reusable Workflows (and ideally to any step/action) could be parsed as strings. It would significantly reduce verbosity and maintenance.
This is a follow-up of https://github.com/orgs/community/discussions/9092
All reactions