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 generic comment on PR script #3571

Merged
merged 3 commits into from
May 22, 2023

Conversation

domoscargin
Copy link
Contributor

@domoscargin domoscargin commented May 3, 2023

This is the MVP for a script to comment on PRs.

It can be passed the Github context, a marker string to identify which comment to target, and the content of the comment. The idea is to get this functionality into the codebase soon, then work on improvements such as:

  • Creating the "stats" workspace to contain this script and other performance monitoring stuff
  • Adding the ability to use workflow parameter inputs to define A and B inputs for diffing

Closes #3545

@govuk-design-system-ci govuk-design-system-ci temporarily deployed to govuk-frontend-pr-3571 May 3, 2023 08:09 Inactive
@github-actions

This comment was marked as outdated.

@govuk-design-system-ci govuk-design-system-ci temporarily deployed to govuk-frontend-pr-3571 May 3, 2023 08:11 Inactive
@domoscargin

This comment was marked as outdated.

@domoscargin domoscargin changed the title Github Actions comment workflow Test [WIP] Github Actions comment workflow May 3, 2023
@domoscargin domoscargin force-pushed the bk-github-actions-comment-workflow branch from a921214 to 1be66c5 Compare May 9, 2023 08:13
@govuk-design-system-ci govuk-design-system-ci temporarily deployed to govuk-frontend-pr-3571 May 9, 2023 08:14 Inactive
@govuk-design-system-ci govuk-design-system-ci temporarily deployed to govuk-frontend-pr-3571 May 9, 2023 08:22 Inactive
@github-actions
Copy link

github-actions bot commented May 9, 2023

Changes to dist

diff --git a/dist/govuk-frontend-4.6.0.min.css b/dist/govuk-frontend-4.6.0.min.css
index ba4a829f..74c2cf8f 100644
--- a/dist/govuk-frontend-4.6.0.min.css
+++ b/dist/govuk-frontend-4.6.0.min.css
@@ -11,7 +11,9 @@
     text-decoration: underline
 }
 
-/*! Copyright (c) 2011 by Margaret Calvert & Henrik Kubel. All rights reserved. The font has been customised for exclusive use on gov.uk. This cut is not commercially available. */
++
+
+/*! Testing comment update */
 @font-face {
     font-family: GDS Transport;
     font-style: normal;

SHA: a5e8d77

@domoscargin domoscargin force-pushed the bk-github-actions-comment-workflow branch from 2813678 to c83d220 Compare May 9, 2023 08:22
@govuk-design-system-ci govuk-design-system-ci temporarily deployed to govuk-frontend-pr-3571 May 9, 2023 08:23 Inactive
@govuk-design-system-ci govuk-design-system-ci temporarily deployed to govuk-frontend-pr-3571 May 9, 2023 08:41 Inactive
@domoscargin domoscargin force-pushed the bk-github-actions-comment-workflow branch from 6e68ff0 to 6dc18c3 Compare May 10, 2023 08:07
@govuk-design-system-ci govuk-design-system-ci temporarily deployed to govuk-frontend-pr-3571 May 10, 2023 08:08 Inactive
@domoscargin domoscargin force-pushed the bk-github-actions-comment-workflow branch from 6dc18c3 to c54eada Compare May 10, 2023 08:08
@govuk-design-system-ci govuk-design-system-ci temporarily deployed to govuk-frontend-pr-3571 May 10, 2023 08:08 Inactive
@domoscargin domoscargin force-pushed the bk-github-actions-comment-workflow branch from c54eada to 3a8a922 Compare May 10, 2023 08:11
@govuk-design-system-ci govuk-design-system-ci temporarily deployed to govuk-frontend-pr-3571 May 10, 2023 08:12 Inactive
@domoscargin domoscargin force-pushed the bk-github-actions-comment-workflow branch from 3a8a922 to 63dcbe0 Compare May 10, 2023 08:12
@govuk-design-system-ci govuk-design-system-ci temporarily deployed to govuk-frontend-pr-3571 May 10, 2023 08:12 Inactive
@domoscargin domoscargin changed the title [WIP] Github Actions comment workflow Add generic comment on PR script May 10, 2023
@domoscargin domoscargin marked this pull request as ready for review May 10, 2023 08:18
@domoscargin domoscargin requested a review from a team as a code owner May 10, 2023 08:18
Copy link
Member

@romaricpascal romaricpascal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cheers for bringing that in and hunting the types to make it all proper 😊 Spotted a little issue with the last comment automatically added on this PR and got a little suggestion for the API.

From having dug a little more into this, do you think there could be a way to add automated tests to the commentOnPr as well or would we have to maintain our own mocks of Github's API and responses for that?

.github/workflows/diff-change-to-dist.yaml Outdated Show resolved Hide resolved
@domoscargin domoscargin marked this pull request as draft May 10, 2023 14:41
@domoscargin domoscargin force-pushed the bk-github-actions-comment-workflow branch from 63dcbe0 to 4948a3d Compare May 10, 2023 14:43
@govuk-design-system-ci govuk-design-system-ci temporarily deployed to govuk-frontend-pr-3571 May 10, 2023 14:43 Inactive
@github-actions
Copy link

github-actions bot commented May 10, 2023

Changes to dist

diff --git a/dist/govuk-frontend-4.6.0.min.css b/dist/govuk-frontend-4.6.0.min.css
index ba4a829f..97c3523d 100644
--- a/dist/govuk-frontend-4.6.0.min.css
+++ b/dist/govuk-frontend-4.6.0.min.css
@@ -11,7 +11,7 @@
     text-decoration: underline
 }
 
-/*! Copyright (c) 2011 by Margaret Calvert & Henrik Kubel. All rights reserved. The font has been customised for exclusive use on gov.uk. This cut is not commercially available. */
+/*! Testing new improvements 11/05/23 4.50pm */
 @font-face {
     font-family: GDS Transport;
     font-style: normal;

SHA: 83da58c

@domoscargin domoscargin force-pushed the bk-github-actions-comment-workflow branch from 4948a3d to aafc839 Compare May 10, 2023 14:48
@colinrotherham colinrotherham force-pushed the bk-github-actions-comment-workflow branch from 7f0b449 to 00a73c2 Compare May 22, 2023 09:22
@govuk-design-system-ci govuk-design-system-ci temporarily deployed to govuk-frontend-pr-3571 May 22, 2023 09:23 Inactive
@colinrotherham colinrotherham force-pushed the bk-github-actions-comment-workflow branch from 00a73c2 to 1183bd8 Compare May 22, 2023 09:29
@govuk-design-system-ci govuk-design-system-ci temporarily deployed to govuk-frontend-pr-3571 May 22, 2023 09:29 Inactive
@govuk-design-system-ci govuk-design-system-ci temporarily deployed to govuk-frontend-pr-3571 May 22, 2023 09:31 Inactive
@colinrotherham colinrotherham force-pushed the bk-github-actions-comment-workflow branch from 51a0f8a to a5277d8 Compare May 22, 2023 09:50
@govuk-design-system-ci govuk-design-system-ci temporarily deployed to govuk-frontend-pr-3571 May 22, 2023 09:51 Inactive
@colinrotherham colinrotherham force-pushed the bk-github-actions-comment-workflow branch from a5277d8 to 3b5417b Compare May 22, 2023 09:54
@govuk-design-system-ci govuk-design-system-ci temporarily deployed to govuk-frontend-pr-3571 May 22, 2023 09:54 Inactive
Co-authored-by: Colin Rotherham <[email protected]>
@colinrotherham colinrotherham force-pushed the bk-github-actions-comment-workflow branch from 3b5417b to 0992816 Compare May 22, 2023 10:23
@govuk-design-system-ci govuk-design-system-ci temporarily deployed to govuk-frontend-pr-3571 May 22, 2023 10:23 Inactive
@colinrotherham colinrotherham force-pushed the bk-github-actions-comment-workflow branch from 0992816 to 2183420 Compare May 22, 2023 10:25
@govuk-design-system-ci govuk-design-system-ci temporarily deployed to govuk-frontend-pr-3571 May 22, 2023 10:25 Inactive
@colinrotherham colinrotherham force-pushed the bk-github-actions-comment-workflow branch from 2183420 to 8c366e1 Compare May 22, 2023 10:29
@govuk-design-system-ci govuk-design-system-ci temporarily deployed to govuk-frontend-pr-3571 May 22, 2023 10:29 Inactive
@colinrotherham colinrotherham force-pushed the bk-github-actions-comment-workflow branch from 8c366e1 to 9adaf2d Compare May 22, 2023 10:30
@govuk-design-system-ci govuk-design-system-ci temporarily deployed to govuk-frontend-pr-3571 May 22, 2023 10:31 Inactive
@colinrotherham colinrotherham force-pushed the bk-github-actions-comment-workflow branch from 9adaf2d to a5e8d77 Compare May 22, 2023 10:33
@govuk-design-system-ci govuk-design-system-ci temporarily deployed to govuk-frontend-pr-3571 May 22, 2023 10:33 Inactive
@colinrotherham colinrotherham force-pushed the bk-github-actions-comment-workflow branch from a5e8d77 to 0b2d6cc Compare May 22, 2023 10:34
@govuk-design-system-ci govuk-design-system-ci temporarily deployed to govuk-frontend-pr-3571 May 22, 2023 10:34 Inactive
@colinrotherham colinrotherham self-requested a review May 22, 2023 10:38
Copy link
Contributor Author

@domoscargin domoscargin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, thanks @colinrotherham

Copy link
Member

@romaricpascal romaricpascal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Neat one! Thanks both! ⛵

@colinrotherham colinrotherham merged commit 89019a6 into main May 22, 2023
@colinrotherham colinrotherham deleted the bk-github-actions-comment-workflow branch May 22, 2023 10:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Introduce reusable action/workflow/script for commenting on PRs reusing the same comment
4 participants