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

[internal] add linked issue workflow that check closing issues samples #24190

Merged
merged 2 commits into from
Dec 12, 2023

Conversation

SudharakaP
Copy link
Member

@SudharakaP SudharakaP commented Nov 12, 2023

Resolve #24183

Please make sure the below checklist is followed for Pull Requests.

When you are still working on the PR, consider converting it to Draft (below reviewers) and adding skip-ci label, you can still see CI build result at your branch.

@SudharakaP SudharakaP self-assigned this Nov 12, 2023
@SudharakaP SudharakaP marked this pull request as draft November 12, 2023 07:10
@SudharakaP SudharakaP force-pushed the feat/add-support-for-pr-linked-issue-check branch from 4402578 to 7ce85ad Compare November 12, 2023 08:06
@SudharakaP SudharakaP marked this pull request as ready for review November 12, 2023 08:08
Copy link
Member

@mshima mshima left a comment

Choose a reason for hiding this comment

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

The idea is to a have full generated sample check at closing (linked) issues at PRs. Like we have in check-issue workflow.

  • the action used to get linked issues prints a warning
image
  • the action used to get linked issues uses custom html parsing
    we should use an action that uses github's built-in closingIssuesReferences
  • issues should be converted to a matrix to check every closing issue
  • should generate the sample using jhipster from-issue, check frontend, backend and e2e.
  • should add a summary check in case we want to make it a requirement to merge

You can use an unfinished branch https://github.com/mshima/generator-jhipster/tree/skip_ci-generate-sample that I am working in parallel to #24135.

@SudharakaP SudharakaP marked this pull request as draft November 12, 2023 16:47
@SudharakaP SudharakaP marked this pull request as ready for review November 12, 2023 17:14
@SudharakaP SudharakaP marked this pull request as draft November 12, 2023 17:17
@jhipster jhipster deleted a comment from github-actions bot Nov 12, 2023
@jhipster jhipster deleted a comment from github-actions bot Nov 12, 2023
@SudharakaP SudharakaP force-pushed the feat/add-support-for-pr-linked-issue-check branch from 3ea1aff to a320fdf Compare December 6, 2023 02:30
@mshima
Copy link
Member

mshima commented Dec 6, 2023

@SudharakaP SudharakaP force-pushed the feat/add-support-for-pr-linked-issue-check branch from 297d934 to 7a1c14f Compare December 7, 2023 04:23
@SudharakaP SudharakaP force-pushed the feat/add-support-for-pr-linked-issue-check branch from 11f4e64 to bfb1cb1 Compare December 7, 2023 05:03
@SudharakaP
Copy link
Member Author

The idea is to a have full generated sample check at closing (linked) issues at PRs. Like we have in check-issue workflow.

* the action used to get linked issues prints a warning
image
* the action used to get linked issues uses [custom html parsing](https://github.com/go-actions/linked-issues/blob/a850d76081f69984c9f3f1d5c2f6e8d0b8743881/main.go#L14-L20)
  we should use an action that uses github's built-in [closingIssuesReferences](https://docs.github.com/en/graphql/reference/objects)

* issues should be converted to a matrix to check every closing issue

* should generate the sample using `jhipster from-issue`, check frontend, backend and e2e.

* should add a summary check in case we want to make it a requirement to merge

You can use an unfinished branch https://github.com/mshima/generator-jhipster/tree/skip_ci-generate-sample that I am working in parallel to #24135.

@mshima : I've made some changes and I believe I've addressed all the concerns here. Take a look and let me know if there's anything missing.

@SudharakaP have you seen the workflow from the branch I´ve posted? https://github.com/mshima/generator-jhipster/blob/skip_ci-generate-sample/.github/workflows/closing-issues-check.yml You can use it.

I didn't use this exactly as I found it a bit hard to understand but hope my method does the job as well. Let me know if you think there's anything I am missing and I am happy to add it. 😉

@SudharakaP SudharakaP marked this pull request as ready for review December 7, 2023 05:06
@SudharakaP
Copy link
Member Author

And I've tested it with this on the current PR run;

Welcome to JHipster v8.0.0

Welcome to the JHipster Information Sub-Generator



tmp@0.0.1-SNAPSHOT /home/afcn/code/tmp
└── generator-jhipster@8.0.0



##### **JHipster configuration, a `.yo-rc.json` file generated in the root folder**


<details>
<summary>.yo-rc.json file</summary>
<pre>
{
  "generator-jhipster": {
    "applicationType": "monolith",
    "authenticationType": "jwt",
    "baseName": "appNg2",
    "buildTool": "gradle",
    "cacheProvider": "ehcache",
    "ci": true,
    "clientFramework": "angular",
    "clientPackageManager": "npm",
    "creationTimestamp": 1596513172471,
    "databaseType": "sql",
    "devDatabaseType": "postgresql",
    "enableHibernateCache": true,
    "enableTranslation": true,
    "jhiPrefix": "custom",
    "jwtSecretKey": "ZjY4MTM4YjI5YzMwZjhjYjI2OTNkNTRjMWQ5Y2Q0Y2YwOWNmZTE2NzRmYzU3NTMwM2NjOTE3MTllOTM3MWRkMzcyYTljMjVmNmQ0Y2MxOTUzODc0MDhhMTlkMDIxMzI2YzQzZDM2ZDE3MmQ3NjVkODk3OTVmYzljYTQyZDNmMTQ=",
    "languages": ["en"],
    "messageBroker": false,
    "nativeLanguage": "en",
    "packageFolder": "io/github/jhipster/app",
    "packageName": "io.github.jhipster.app",
    "prodDatabaseType": "postgresql",
    "rememberMeKey": "448f9a67a8a292c4905a733ec22cc3b78e493c56",
    "searchEngine": false,
    "serverPort": "8080",
    "serviceDiscoveryType": false,
    "testFrameworks": ["gatling", "cypress"],
    "useSass": false,
    "websocket": false
  }
}
</pre>
</details>


##### **Environment and Tools**

openjdk version "17.0.9" 2023-10-17
OpenJDK Runtime Environment (build 17.0.9+9-Ubuntu-122.04)
OpenJDK 64-Bit Server VM (build 17.0.9+9-Ubuntu-122.04, mixed mode, sharing)

git version 2.34.1

node: v20.10.0
npm: 10.2.3

Docker version 24.0.6, build ed223bc

##### **JDL for the Entity configuration(s) `entityName.json` files generated in the `.jhipster` directory**

<details>
<summary>JDL entity definitions</summary>

<pre>

</pre>
</details>


Congratulations, JHipster execution is complete!
If you find JHipster useful consider sponsoring the project https://www.jhipster.tech/sponsors/

Thanks for using JHipster!

Copy link
Member

@mshima mshima left a comment

Choose a reason for hiding this comment

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

We should make sure to remove blueprint support for security reason.
Blueprint auto install can install an arbitrary package and execute it.

.github/workflows/linked-issue-check.yml Outdated Show resolved Hide resolved
.github/workflows/linked-issue-check.yml Outdated Show resolved Hide resolved
.github/workflows/linked-issue-check.yml Outdated Show resolved Hide resolved
.github/workflows/linked-issue-check.yml Outdated Show resolved Hide resolved
.github/workflows/linked-issue-check.yml Show resolved Hide resolved
.github/workflows/linked-issue-check.yml Outdated Show resolved Hide resolved
@SudharakaP SudharakaP force-pushed the feat/add-support-for-pr-linked-issue-check branch 2 times, most recently from 24a4a6b to bcef48c Compare December 7, 2023 16:19
@SudharakaP SudharakaP force-pushed the feat/add-support-for-pr-linked-issue-check branch from 363eb2d to 6425f61 Compare December 8, 2023 09:14
mshima
mshima previously approved these changes Dec 11, 2023
Copy link
Member

@mshima mshima left a comment

Choose a reason for hiding this comment

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

I will work on disable blueprint support before merging.

Copy link
Member

@mshima mshima left a comment

Choose a reason for hiding this comment

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

Need to fix prettier.

.github/workflows/linked-issue-check.yml Outdated Show resolved Hide resolved
@SudharakaP
Copy link
Member Author

Need to fix prettier.

Thanks. I've fixed prettier as well as added the disable-blueprints flag. 👍🏽

@SudharakaP SudharakaP force-pushed the feat/add-support-for-pr-linked-issue-check branch from 03c4cdd to 75ce917 Compare December 12, 2023 19:35
@mshima mshima changed the title Add support for from-issue check to PR that fixes an issue [internal] add linked issue workflow that check closing issues samples Dec 12, 2023
@mshima mshima merged commit 02e0986 into main Dec 12, 2023
55 checks passed
@mshima mshima deleted the feat/add-support-for-pr-linked-issue-check branch December 12, 2023 20:19
@SudharakaP
Copy link
Member Author

@mshima : Thanks a lot for all the reviews and feedback. 🤗

@deepu105 deepu105 added this to the 8.2.0 milestone Mar 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add from-issue check to PR that fixes an Issue.
4 participants