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

[Issue #2495] Set points and sprint on close #2519

Draft
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

widal001
Copy link
Collaborator

@widal001 widal001 commented Oct 18, 2024

Summary

Adds new linter to set a default value for points and sprint if those fields are unset when an issue is closed.

Fixes #2495

Time to review: 5 mins

Changes proposed

What was added, updated, or removed in this PR.

  • Adds linters/scripts/set-points-and-sprint.sh
  • Adds associated queries:
    • linters/queries/getFieldMetadata.graqphql
    • linters/queries/getItemMetadata.graphql

Context for reviewers

Testing instructions, background context, more in-depth details of the implementation, and anything else you'd like to call out or ask reviewers. Explain how the changes were verified.

This action will trigger every time an issue is closed in the repo.

Questions

  1. Do we only want to apply this to issues with a certain type (e.g. bug, task, etc.)
  2. Should we post a comment to the ticket if these field values are set?
  3. Are there other instances when this action shouldn't run (even if these fields are unset)?

TODO

  • Update script to handle dry run mode
  • Add CI test to ci-project-linters.yml
  • Potentially update script based on questions above

Additional information

Screenshots, GIF demos, code examples or output to help show the changes working as expected.

Here's an example of this action from our sandbox repo

Screen.Recording.2024-10-18.at.9.31.55.AM.mov

Here's an example of a dry run within this repo:

Screenshot 2024-10-18 at 3 17 08 PM

Creates scripts for a linter that sets the points and scripts fields to
a default value if those fields are unset when an issue is closed
@github-actions github-actions bot added the ci/cd label Oct 18, 2024
@coilysiren
Copy link
Collaborator

@widal001

Do we only want to apply this to issues with a certain type (e.g. bug, task, etc.)

a) You can either include:

  • Bug
  • Task
  • Enhancement
  • Deliverable

b) Or exclude

  • Epic

Option (a) sounds safer

Should we post a comment to the ticket if these field values are set?

Yes that sounds great! I love clarifying comments from bots

Are there other instances when this action shouldn't run (even if these fields are unset)?

If you can only include tick where { author is users in this repo with the permission level write access }, that would be ace. But we might get that for free? I dunno.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Set points and sprint value for issues on close
2 participants