Skip to content
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

Include triggering_actor in GitHub Workflow Runs #314

Closed
julioz opened this issue Aug 15, 2023 · 8 comments
Closed

Include triggering_actor in GitHub Workflow Runs #314

julioz opened this issue Aug 15, 2023 · 8 comments
Assignees
Labels
enhancement New feature or request

Comments

@julioz
Copy link

julioz commented Aug 15, 2023

Is your feature request related to a problem? Please describe.
We have a few workflows internally we'd like to aggregate metrics on. One of them is "who is the person who mostly triggers it per week?".

Describe the solution you'd like
The GitHub API for workflow runs includes triggering_actor as a field, and so does the GitHub Actions workflows UI.

Describe alternatives you've considered
N/A

Additional context
N/A

@julioz julioz added the enhancement New feature or request label Aug 15, 2023
@graza-io
Copy link
Contributor

@julioz

If you do some comparative testing, is the triggering_actor usually different from the actor?

I can see we don't include either at the current moment in time, however based on the SDK we're using to obtain the data, they don't seemingly have a concept of triggering_actor only actor struct here.

@julioz
Copy link
Author

julioz commented Aug 15, 2023

I believe that, for my specific use-case, actor should work fine, although triggering_actor can be different.

According to this post on when GitHub introduced the differentiation, a workflow will have a actor that is not the triggering_actor when it is a rerun.

That is:

  1. Workflow W is executed by User A
  2. Workflow W fails
  3. Workflow W is executed by User T

In this case, actor = A, triggering_actor = T.

@graza-io
Copy link
Contributor

graza-io commented Aug 16, 2023

Did some investigation, have now requested the relevant data be included in the go-github SDK on this issue

@julioz
Copy link
Author

julioz commented Aug 16, 2023

Thanks. Looking forward to this change (except I think you mean go-github and not go-gitlab).

@graza-io
Copy link
Contributor

Yeah I did 😂 - sorry, I'm looking at things in both libraries now and I keep cross typing the names.

@graza-io
Copy link
Contributor

SDK v54.0.0 contains the new field on struct - assuming no other breaking changes we should now be able to action this request.

@graza-io graza-io self-assigned this Aug 17, 2023
@graza-io graza-io removed their assignment Aug 30, 2023
@graza-io
Copy link
Contributor

Looking at the breaking changes in versions between current and v54, only one stands out as potential issue:

  • Issue/PR which changes all time.Time to internal type Timestamp, we do have the translation code for these so should be simple as updating where required.

@misraved
Copy link
Contributor

misraved commented Sep 13, 2023

Addressed in #332

Thanks @julioz and @graza-io for all the great work 👍 !!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
3 participants