Skip to content

Labeled action on pull_request #25394

Answered by peter-evans
bbbryan14 asked this question in Actions
Discussion options

You must be logged in to vote

If you use this step to output the entire github context you can see what the JSON looks like.

- name: Dump GitHub context
        env:
          GITHUB_CONTEXT: ${{ toJson(github) }}
        run: echo "$GITHUB_CONTEXT"

I ran it for a PR with two labels and the context output looks like this.

"labels": [
      {
        "color": "ededed",
        "default": false,
        "id": 1579077344,
        "name": "automated pr",
        "node_id": "MDU6TGFiZWwxNTc5MDc3MzQ0",
        "url": "https://api.github.com/repos/peter-evans/actions-playground/labels/automated%20pr"
      },
      {
        "color": "ededed",
        "default": false,
        "id": 1441562142,
        "name": "report",
   …

Replies: 5 comments

Comment options

You must be logged in to vote
0 replies
Answer selected
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants