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 commit check for "Fixes #issue" in comment #1031

Closed
lifflander opened this issue Sep 8, 2020 · 2 comments · Fixed by #1058
Closed

Add commit check for "Fixes #issue" in comment #1031

lifflander opened this issue Sep 8, 2020 · 2 comments · Fixed by #1058
Assignees

Comments

@lifflander
Copy link
Collaborator

lifflander commented Sep 8, 2020

What Needs to be Done?

If a PR is created, users should normally annotate that PR as it fixes an issue so the issue automatically closes when the PR is merged. However, it's easy to forgot to add that to the comment.

Write a PR hook (like the issue style checks) that greps for that in the issue comment so we can inform the user if they forgot.

You can probably model it after the commit check hook, that I've developed in this repo: https://github.com/DARMA-tasking/check-commit-format

@PhilMiller
Copy link
Member

Is the PR description available to the hooks? The relevant line won't necessarily appear in a commit message

@lifflander
Copy link
Collaborator Author

lifflander commented Sep 9, 2020

Yes, the PR description is available to the workflow. Note that issues and PRs are the same structure in GitHub, just a bit set to indicate which one. The code to get to it in a workflow will look something like:

contains(${{ github.event.issue.body}}, 'Fixes')

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

Successfully merging a pull request may close this issue.

3 participants