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

Add runner attributes to WorkflowJob #2902

Conversation

boomanaiden154
Copy link
Contributor

This patch adds the runner attributes to the WorkflowJob class. The four attributes, runner_id, runner_name, runner_group_id, and runner_group_name are always sent along with the job information, but before this patch, are not represented in PyGtithub. This patch adds the attributes and test coverage.

@codecov-commenter
Copy link

codecov-commenter commented Feb 17, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (cd8e528) 96.70% compared to head (3b0ef28) 96.71%.

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2902   +/-   ##
=======================================
  Coverage   96.70%   96.71%           
=======================================
  Files         147      147           
  Lines       14885    14913   +28     
=======================================
+ Hits        14395    14423   +28     
  Misses        490      490           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@boomanaiden154 boomanaiden154 force-pushed the add-runner-attributes-workflow-job branch from 76cd136 to f5a4b81 Compare February 17, 2024 22:43
This patch adds the runner attributes to the WorkflowJob class. The four
attributes, runner_id, runner_name, runner_group_id, and
runner_group_name are always sent along with the job information, but
before this patch, are not represented in PyGtithub. This patch adds the
attributes and test coverage.
Copy link
Collaborator

@EnricoMi EnricoMi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good. While you are there, could you add the remaining missing attributes?

  • created_at
  • head_branch
  • labels
  • run_attempt
  • started_at
  • status
  • steps
  • url
  • workflow_name

Copy link
Collaborator

@EnricoMi EnricoMi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While you are adding new attributes, can you please add all missing attributes? I think these are also missing:

  • run_attempt
  • created_at
  • completed_at
  • labels
  • workflow_name
  • head_branch

Comment on lines +56 to +59
self._runner_id: Attribute[int] = NotSet
self._runner_name: Attribute[str] = NotSet
self._runner_group_id: Attribute[int] = NotSet
self._runner_group_name: Attribute[str] = NotSet
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you keep this list of attributes in alphabetical order?

@EnricoMi
Copy link
Collaborator

Looks like I did this review before... what a pity...

@xvega
Copy link
Contributor

xvega commented Mar 16, 2024

Looks like I did this review before... what a pity...

To speed things up, I opened a PR #2921 with @boomanaiden154 changes and addressed your feedback @EnricoMi

@EnricoMi
Copy link
Collaborator

Superseded by #2921.

@EnricoMi EnricoMi closed this Mar 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants