Skip to content

Conversation

@vlukashov
Copy link

Description

Intended usage: node scripts/transferIssues.js to transfer all open issues from individual web component repos into the web-components monorepo for each of the web components in the ./packages folder of this monorepo.

Labels on the transferred issues are transferred as well. The transferred issues remain in the same pipelines (columns) on all ZenHub boards (if both the web-components monorepo and the original issue's repo are present on the board).

If a label was missing in the web-components repo, it will be created (with the same color as in the original repo).

Fixes https://github.com/vaadin/components-team-tasks/issues/580

Type of change

  • Bugfix
  • Feature
  • Internal change

Checklist

  • I have read the contribution guide: https://vaadin.com/docs-beta/latest/guide/contributing/overview/
  • I have added a description following the guideline.
  • The issue is created in the corresponding repository and I have referenced it.
  • I have added tests to ensure my change is effective and works as intended.
  • New and existing tests are passing locally with my change.
  • I have performed self-review and corrected misspellings.

Viktor Lukashov added 10 commits May 12, 2021 22:43
Intended usage: `node scripts/transferIssues.js` to transfer all open issues from individual web component repos into the web-components monorepo for each of the web components in the ./packages folder of this monorepo.

Labels on the transferred issues are transferred as well. The transferred issues remain in the same pipelines (columns) on the DS team ZH boards.

If a label was missing in the web-components repo, it will be created (with the same color as in the original repo).
TODO: handle ZenHub rate limiting
The vaadin-messages repo is handled by the CE team. We could agree to move its issues separately.
If a label is present on an issue before the transfer it should be created in the target repo before it can be put on the transferred issue.
ZH epics should be skipped to be transferred manually because all ZH epic info is lost when an issue is transferred using the GH API.

ZH estimates are identified to transfer them automatically (still TODO).
The changes done in this commit do not affect the functionality at all. They are done to make understanding the code easier.
When reviewing functional changes, this commit may be skipped.
Also add more filtering to have a way to limit the scope of this script, which is handy for testing.

To run this script 'for real' execute `PRODUCTION_RUN=true node scripts/transferIssues.js`. With the filters as they are committed right now this script would transfer a single issue: https://github.com/vaadin/magi-cli/issues/142
@ZheSun88
Copy link
Collaborator

one concern: I am not sure if the octokit takes care of the rate limits for github APIs, if not, there should be a timeout in between each github api calls, probably it is good to test with a repo with more issues, for example vaadin-grid or vaadin-combo-box.

@vlukashov
Copy link
Author

vlukashov commented May 17, 2021

one concern: I am not sure if the octokit takes care of the rate limits for github APIs, if not, there should be a timeout in between each github api calls, probably it is good to test with a repo with more issues, for example vaadin-grid or vaadin-combo-box.

I do not expect the GitHub rate limiting ot be a problem. I've tried to run this script with the full scope (but not making actual changes) and GitHub was OK with all the requests this script made for 1.5k issues. Apparently, ZenHub has a more strict rate limit.

Viktor Lukashov added 2 commits May 17, 2021 13:46
Automatically disable the "Issues" tab in the GitHub UI for the source repos that do not have any issues remaining after the transfer.
@sonarqubecloud
Copy link

SonarCloud Quality Gate failed.

Bug D 3 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 7 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@vlukashov vlukashov merged commit aa52f27 into master May 18, 2021
@vlukashov vlukashov deleted the vl/transfer-issues branch May 18, 2021 06:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants