docs icon indicating copy to clipboard operation
docs copied to clipboard

Issue event `assigned` does not have `assigner`

Open yanyongyu opened this issue 2 years ago • 3 comments

Code of Conduct

What article on docs.github.com is affected?

https://docs.github.com/en/developers/webhooks-and-events/events/issue-event-types#assigned

https://docs.github.com/en/developers/webhooks-and-events/events/issue-event-types#unassigned

What part(s) of the article would you like to see updated?

https://github.com/github/docs/blob/fed0a6c56ee6c6cce63ff06ac760edc5439aa7d7/data/reusables/issue-events/assignee-properties.md?plain=1#L1-L2

As described in the github/rest-api-description repo, the timeline api returns the assigned event as follows:

timeline-assigned-issue-event:
  title: Timeline Assigned Issue Event
  description: Timeline Assigned Issue Event
  type: object
  properties:
    id:
      type: integer
    node_id:
      type: string
    url:
      type: string
    actor:
      "$ref": "#/components/schemas/simple-user"
    event:
      type: string
    commit_id:
      type:
      - string
      - 'null'
    commit_url:
      type:
      - string
      - 'null'
    created_at:
      type: string
    performed_via_github_app:
      anyOf:
      - type: 'null'
      - "$ref": "#/components/schemas/integration"
    assignee:
      "$ref": "#/components/schemas/simple-user"

the field assigner is not included.

Additional information

No response

yanyongyu avatar Sep 23 '22 13:09 yanyongyu

Thanks for opening this issue. A GitHub docs team member should be by to give feedback soon. In the meantime, please check out the contributing guidelines.

welcome[bot] avatar Sep 23 '22 13:09 welcome[bot]

@yanyongyu Thanks so much for opening an issue! I'll triage this for the team to take a look :eyes:

cmwilson21 avatar Sep 23 '22 16:09 cmwilson21

Thanks for this issue! You or anyone else is welcome to open a PR to correct this.

skedwards88 avatar Sep 23 '22 18:09 skedwards88

Hi, i have just created a pull request for this prop removing.

yanyongyu avatar Sep 25 '22 03:09 yanyongyu

Sorry, I'm just a newbie here, but I don't catch why I can find assigner in the document, but NOT the same call/event. Are we speaking of the same thing ?!

source : https://raw.githubusercontent.com/github/rest-api-description/main/descriptions-next/github.ae/github.ae.json

...I'm not aware enough to know if the source is correct.
But definively, if timeline-assigned-issue-event doesn't show it, assigned-issue-event and unassigned-issue-event does...

There might be (...I think there is !) a discrepancy between Issue events API and Timeline events API ?

Hope it helps.

In other words, actually, the comment should be :

assigner object (only available for Issue events API, not Timeline events API)
The person who performed the unassignment for this issue.
  "assigned-issue-event": {
    "title": "Assigned Issue Event",
    "description": "Assigned Issue Event",
    "type": "object",
    "properties": {
      "id": {
        "type": "integer"
      },
      "node_id": {
        "type": "string"
      },
      "url": {
        "type": "string"
      },
      "actor": {
        "$ref": "#/components/schemas/simple-user"
      },
      "event": {
        "type": "string"
      },
      "commit_id": {
        "type": [
          "string",
          "null"
        ]
      },
      "commit_url": {
        "type": [
          "string",
          "null"
        ]
      },
      "created_at": {
        "type": "string"
      },
      "performed_via_github_app": {
        "$ref": "#/components/schemas/integration"
      },
      "assignee": {
        "$ref": "#/components/schemas/simple-user"
      },
      "assigner": {
        "$ref": "#/components/schemas/simple-user"
      }
    },
    "required": [
      "id",
      "node_id",
      "url",
      "actor",
      "event",
      "commit_id",
      "commit_url",
      "created_at",
      "performed_via_github_app",
      "assignee",
      "assigner"
    ]
  },
  "unassigned-issue-event": {
    "title": "Unassigned Issue Event",
    "description": "Unassigned Issue Event",
    "type": "object",
    "properties": {
      "id": {
        "type": "integer"
      },
      "node_id": {
        "type": "string"
      },
      "url": {
        "type": "string"
      },
      "actor": {
        "$ref": "#/components/schemas/simple-user"
      },
      "event": {
        "type": "string"
      },
      "commit_id": {
        "type": [
          "string",
          "null"
        ]
      },
      "commit_url": {
        "type": [
          "string",
          "null"
        ]
      },
      "created_at": {
        "type": "string"
      },
      "performed_via_github_app": {
        "anyOf": [
          {
            "type": "null"
          },
          {
            "$ref": "#/components/schemas/integration"
          }
        ]
      },
      "assignee": {
        "$ref": "#/components/schemas/simple-user"
      },
      "assigner": {
        "$ref": "#/components/schemas/simple-user"
      }
    },
    "required": [
      "id",
      "node_id",
      "url",
      "actor",
      "event",
      "commit_id",
      "commit_url",
      "created_at",
      "performed_via_github_app",
      "assignee",
      "assigner"
    ]
  },

CapitainFlam avatar Sep 26 '22 12:09 CapitainFlam

There might be (...I think there is !) a discrepancy between Issue events API and Timeline events API ?

I just tested for the diff between timeline events and issue events. The timeline api does not return the assigner but the issue events api does. Maybe we should change the comment?

But, why timeline events api does not return the assigner?

yanyongyu avatar Sep 26 '22 12:09 yanyongyu

That's something I am unable to solve, as I didn't manage to go deeper, but I sure we should have an answer from dev. team before going further about the documentation 🤣 !

Thank you for having done tests 👍

CapitainFlam avatar Sep 26 '22 14:09 CapitainFlam

Thanks for digging into this! ✨ You are correct that the Issue events API response includes assigner but the Timeline events API does not. In that case, I think you can amend the PR to include this (I left a comment on https://github.com/github/docs/pull/20854 ).

skedwards88 avatar Sep 26 '22 23:09 skedwards88

I left a comment on #20854.

Thx for the suggestion. I just applied the change.

yanyongyu avatar Sep 27 '22 00:09 yanyongyu

🎉 Glad I could help 😸

CapitainFlam avatar Sep 29 '22 20:09 CapitainFlam