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

Changed lines of modified files #858

Closed
2 tasks done
ImanMahmoudinasab opened this issue Dec 13, 2022 · 2 comments
Closed
2 tasks done

Changed lines of modified files #858

ImanMahmoudinasab opened this issue Dec 13, 2022 · 2 comments
Labels
enhancement New feature or request

Comments

@ImanMahmoudinasab
Copy link

Is this feature missing in the latest version?

  • I'm using the latest release

Is your feature request related to a problem? Please describe.

Why:

By providing the start and end of changed lines (chars) one can check some validations that only apply to the changed lines.

Use cases:

on a pull request, a github action will only check to see if developer has added a new inline disabled rule for eslint and create a comment to make it visible to reviewers that the pr includes disabled rules.

Describe the solution you'd like?

I think the provided output should include the changed lines:

modified_files_details   |   array<changeInfo>    |  [{file:string, type:modified | deleted | added, changes:[{startLine:number, endLine:number}]}]

Ex.

[ 
   {file:'package.json', type: 'modified', changes:[{startLine:2, endLine:5}, {startLine:13, endLine:15}]},
   {file:'package.json', type: 'added', changes:[{startLine:20, endLine:21}]}
]

or we can use file names as keys:

modified_files_details   |  object    |  {fileName:[{ type:modified | deleted | added, changes:[{startLine:number, endLine:number}]}]}

Ex.

{ 
   'package.json': {type: 'modified', changes:[{startLine:2, endLine:5}, {startLine:13, endLine:15}]},
   'package.json': {type: 'added', changes:[{startLine:20, endLine:21}]},
}

Describe alternatives you've considered?

No response

Anything else?

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct
@ImanMahmoudinasab ImanMahmoudinasab added the enhancement New feature or request label Dec 13, 2022
@github-actions
Copy link
Contributor

Thanks for reporting this issue, don't forget to star this project if you haven't already to help us reach a wider audience.

@jackton1
Copy link
Member

@ImanMahmoudinasab Thanks for your suggestion, given the complexity of managing the number of lines that can change in a Pull Request, at this time this wouldn't be possible without a more involved action so I'll recommend integrating a third-party solution which should be able to handle the complexity on a case-by-case basis.

@jackton1 jackton1 closed this as not planned Won't fix, can't repro, duplicate, stale Dec 19, 2022
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
Development

No branches or pull requests

2 participants