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

[Annotations] Should link to most recent version of file #566

Closed
JustinGrote opened this issue Jun 24, 2020 · 1 comment
Closed

[Annotations] Should link to most recent version of file #566

JustinGrote opened this issue Jun 24, 2020 · 1 comment
Labels
enhancement New feature or request

Comments

@JustinGrote
Copy link

JustinGrote commented Jun 24, 2020

Enhancement Description

Often an annotation may reference a file that isn't present in the latest file of a commit.

For example:

  1. User creates a pull request
  2. An action creates an annotation letting them know their syntax is incorrect
  3. User can click the link and go directly to the code with the annotation
    image
  4. User makes an unrelated change to the code and commits it.
  5. The action runs again and identifies the same syntax error, however the link shown above still only points to the most recent commit and therefore the link is now broken. Example here:
    https://github.com/JustinGrote/Super-Duper-Linter/actions/runs/146628514
    JustinGrote/Super-Duper-Linter@8925755#annotation_266417563

Recommended Resolution

The annotation engine should first check the commit if the file was edited in the current commit. If not, then it should do the equivalent of git log --follow -n 1 <filepath> to find the most recent commit and generate the annotation and link on that commit.

Alternatively the frontend link engine could be smart enough that, if an annotation is defined on a commit but the file doesn't exist in the commit, then do the equivalent above to find the file in a previous commit that the annotation was referencing and present it. This would probably be a smarter approach to avoid annotations "leaking" into parent branches.

NOTE: if the feature request has been agreed upon then the assignee will create an ADR. See docs/adrs/README.md

@nikola-jokic
Copy link
Member

Hi @JustinGrote,

This issue does not seem to be a problem with the runner application, it concerns the GitHub actions platform more generally. Could you please post your feedback on the GitHub Community Support Forum which is actively monitored? Using the forum ensures that we route your problem to the correct team. 😃

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