MarkBind / markbind

MarkBind is a tool for generating content-heavy websites from source files in Markdown format
https://markbind.org/
MIT License
134 stars 123 forks source link

Utilize GitHub Actions to check for SEMVER impact label #2470

Closed KevinEyo1 closed 3 months ago

KevinEyo1 commented 3 months ago

What is the purpose of this pull request?

Overview of changes: Fixes #2464 Added a new workflow that runs jobs on PR closing to master branch (only if its merging in, so won't be run if PR is just closed without merging)

Anything you'd like to highlight/discuss: Figuring how to best test this, due to limitations in regard to local testing of closing PRs

Testing instructions:

Proposed commit message: (wrap lines at 72 characters) GitHub Actions: check impact label

It is easy to forget to label PRs with their SEMVER impact when merging.

Adding a workflow to automate labelling will help prevent users from missing labels when merging.

Let's check the PR body description for user selected impact, and automatically add the label to the PR when merging.

This approach allows the user to not even have to add the label themselves.


Checklist: :ballot_box_with_check:


Reviewer checklist:

Indicate the SEMVER impact of the PR:

At the end of the review, please label the PR with the appropriate label: r.Major, r.Minor, r.Patch.

Breaking change release note preparation (if applicable):

Give a brief explanation note about:

  • what was the old feature that was made obsolete
  • any replacement feature (if any), and
  • how the author should modify his website to migrate from the old feature to the replacement feature (if possible).
codecov[bot] commented 3 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 50.98%. Comparing base (9da549c) to head (3fc3621).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #2470 +/- ## ======================================= Coverage 50.98% 50.98% ======================================= Files 124 124 Lines 5305 5305 Branches 1137 1137 ======================================= Hits 2705 2705 Misses 2311 2311 Partials 289 289 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

yucheng11122017 commented 3 months ago

Hi @KevinEyo1 could you add your test workflows where

so that we can check that it is working as expected?

KevinEyo1 commented 3 months ago

Hi @yucheng11122017 sorry I'm not sure what you mean. I tested by creating a branch clone of master branch (to avoid merge conflicts) and did PRs to it to test.

yucheng11122017 commented 3 months ago

Hi @yucheng11122017 sorry I'm not sure what you mean. I tested by creating a branch clone of master branch (to avoid merge conflicts) and did PRs to it to test.

Ok sorry for the lack of explaining. You tested it with your clone right? Could you include the workflow runs here? An example of the workflow run for remind-pr-author is https://github.com/MarkBind/markbind/actions/runs/8347424812/job/22846993395?pr=2470

I see some workflows on your fork as well such as https://github.com/KevinEyo1/markbind/actions/runs/8347414874

Could you include the corresponding workflows where

KevinEyo1 commented 3 months ago

Hi @yucheng11122017 thanks for the clarification. ~~No impact selected and fails 2 impacts selected and fails r.Patch selected and passes~~

KevinEyo1 commented 3 months ago

Updated job runs ~~No impact selected and fails 2 impacts selected and fails r.Major selected and passes~~

KevinEyo1 commented 3 months ago

~~Updated job runs No impact selected and fails 2 impacts selected and fails r.Major selected and passes~~

kaixin-hc commented 3 months ago

It still seems to be on "on PR closed" - any reason why you aren't using "on PR approved" as suggested in the issue by @tlylt ?

KevinEyo1 commented 3 months ago

~~Updated job runs No impact selected and fails 2 impacts selected and fails r.Major selected and passes~~

yucheng11122017 commented 3 months ago

@KevinEyo1 could you check why the check is failing on this PR?

image

KevinEyo1 commented 3 months ago

Hi @yucheng11122017, I will take a look into it

yucheng11122017 commented 3 months ago

Hi @yucheng11122017, I will take a look into it

This PR

KevinEyo1 commented 3 months ago

Hi @yucheng11122017, can you try it now? I gave the action permission to write to PRs which allows it to add labels.

yucheng11122017 commented 3 months ago

I think it still doesn't work @KevinEyo1 Ill leave the approval here first so you can check the logs more easily https://github.com/MarkBind/markbind/actions/runs/8431248927/job/23088357523?pr=2470

KevinEyo1 commented 3 months ago

Hi @yucheng11122017 sorry about that, can you try again? I set pr - write instead of issue - write for better scoping (pr is a subset of issue), but the action im using interacts with the github API through issues. I changed it back to issue - write so it should work now

KevinEyo1 commented 3 months ago

Updated job runs No impact selected and fails 2 impacts selected and fails r.Major selected and passes