Skip to content

Commit

Permalink
tests: reorganise for pull_request event (#16)
Browse files Browse the repository at this point in the history
  • Loading branch information
sgoudham authored Sep 21, 2024
1 parent cb1559a commit 25c2784
Show file tree
Hide file tree
Showing 8 changed files with 2,232 additions and 1,198 deletions.
521 changes: 521 additions & 0 deletions fixtures/pull_request/closed.json

Large diffs are not rendered by default.

521 changes: 521 additions & 0 deletions fixtures/pull_request/opened.json

Large diffs are not rendered by default.

Large diffs are not rendered by default.

521 changes: 521 additions & 0 deletions fixtures/pull_request/reopened.json

Large diffs are not rendered by default.

80 changes: 32 additions & 48 deletions fixtures/pull_request_review/commented.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"action": "submitted",
"review": {
"id": 2311209963,
"node_id": "PRR_kwDOIVi3Lc6JwkPr",
"id": 2319885438,
"node_id": "PRR_kwDOIVi3Lc6KRqR-",
"user": {
"login": "sgoudham",
"id": 58985301,
Expand All @@ -23,16 +23,16 @@
"type": "User",
"site_admin": false
},
"body": "normal",
"body": "a normal review",
"commit_id": "f8af40f25a8cf515c73367a1bbb079f7fc4d82d1",
"submitted_at": "2024-09-17T22:38:54Z",
"submitted_at": "2024-09-21T18:20:53Z",
"state": "commented",
"html_url": "https://github.com/catppuccin-rfc/polybar/pull/3#pullrequestreview-2311209963",
"html_url": "https://github.com/catppuccin-rfc/polybar/pull/3#pullrequestreview-2319885438",
"pull_request_url": "https://api.github.com/repos/catppuccin-rfc/polybar/pulls/3",
"author_association": "NONE",
"_links": {
"html": {
"href": "https://github.com/catppuccin-rfc/polybar/pull/3#pullrequestreview-2311209963"
"href": "https://github.com/catppuccin-rfc/polybar/pull/3#pullrequestreview-2319885438"
},
"pull_request": {
"href": "https://api.github.com/repos/catppuccin-rfc/polybar/pulls/3"
Expand Down Expand Up @@ -71,25 +71,17 @@
"type": "Bot",
"site_admin": false
},
"body": "Welcome to [Renovate](https://redirect.github.com/renovatebot/renovate)! This is an onboarding PR to help you understand and configure settings before regular Pull Requests begin.\n\n🚦 To activate Renovate, merge this Pull Request. To disable Renovate, simply close this Pull Request unmerged.\n\n\n\n---\n\n### Configuration Summary\n\nBased on the default config's presets, Renovate will:\n\n - Start dependency updates only once this onboarding PR is merged\n - Show all Merge Confidence badges for pull requests.\n - Enable Renovate Dependency Dashboard creation.\n - Use semantic commit type `fix` for dependencies and `chore` for all others if semantic commits are in use.\n - Ignore `node_modules`, `bower_components`, `vendor` and various test/tests (except for nuget) directories.\n - Group known monorepo packages together.\n - Use curated list of recommended non-monorepo package groupings.\n - Apply crowd-sourced package replacement rules.\n - Apply crowd-sourced workarounds for known problems with packages.\n\n🔡 Do you want to change how Renovate upgrades your dependencies? Add your custom config to `renovate.json` in this branch. Renovate will update the Pull Request description the next time it runs.\n\n---\n\n### What to Expect\n\nIt looks like your repository dependencies are already up-to-date and no Pull Requests will be necessary right away.\n\n---\n\n❓ Got questions? Check out Renovate's [Docs](https://docs.renovatebot.com/), particularly the Getting Started section.\nIf you need any further assistance then you can also [request help here](https://redirect.github.com/renovatebot/renovate/discussions).\n\n---\n\nThis PR was generated by [Mend Renovate](https://mend.io/renovate/). View the [repository job log](https://developer.mend.io/github/catppuccin-rfc/polybar).\n\n<!--renovate-config-hash:e80b4e42a3043bc12fa0640db4bac392d2bf770acf841360d7c8ceeeac2ec1a9-->\n",
"body": "Welcome to [Renovate](https://redirect.github.com/renovatebot/renovate)! This is an onboarding PR to help you understand and configure settings before regular Pull Requests begin.\n\n\ud83d\udea6 To activate Renovate, merge this Pull Request. To disable Renovate, simply close this Pull Request unmerged.\n\n\n\n---\n\n### Configuration Summary\n\nBased on the default config's presets, Renovate will:\n\n - Start dependency updates only once this onboarding PR is merged\n - Show all Merge Confidence badges for pull requests.\n - Enable Renovate Dependency Dashboard creation.\n - Use semantic commit type `fix` for dependencies and `chore` for all others if semantic commits are in use.\n - Ignore `node_modules`, `bower_components`, `vendor` and various test/tests (except for nuget) directories.\n - Group known monorepo packages together.\n - Use curated list of recommended non-monorepo package groupings.\n - Apply crowd-sourced package replacement rules.\n - Apply crowd-sourced workarounds for known problems with packages.\n\n\ud83d\udd21 Do you want to change how Renovate upgrades your dependencies? Add your custom config to `renovate.json` in this branch. Renovate will update the Pull Request description the next time it runs.\n\n---\n\n### What to Expect\n\nIt looks like your repository dependencies are already up-to-date and no Pull Requests will be necessary right away.\n\n---\n\n\u2753 Got questions? Check out Renovate's [Docs](https://docs.renovatebot.com/), particularly the Getting Started section.\nIf you need any further assistance then you can also [request help here](https://redirect.github.com/renovatebot/renovate/discussions).\n\n---\n\nThis PR was generated by [Mend Renovate](https://mend.io/renovate/). View the [repository job log](https://developer.mend.io/github/catppuccin-rfc/polybar).\n\n<!--renovate-config-hash:e80b4e42a3043bc12fa0640db4bac392d2bf770acf841360d7c8ceeeac2ec1a9-->\n",
"created_at": "2024-09-17T21:44:56Z",
"updated_at": "2024-09-17T22:38:54Z",
"updated_at": "2024-09-21T18:20:53Z",
"closed_at": null,
"merged_at": null,
"merge_commit_sha": "5148c823659a98f15c9ebb0f82ab95bea095a78e",
"merge_commit_sha": "5e615d5200c53404175b3dbf6a03f4b893ab6288",
"assignee": null,
"assignees": [

],
"requested_reviewers": [

],
"requested_teams": [

],
"labels": [

],
"assignees": [],
"requested_reviewers": [],
"requested_teams": [],
"labels": [],
"milestone": null,
"draft": false,
"commits_url": "https://api.github.com/repos/catppuccin-rfc/polybar/pulls/3/commits",
Expand Down Expand Up @@ -188,14 +180,14 @@
"releases_url": "https://api.github.com/repos/catppuccin-rfc/polybar/releases{/id}",
"deployments_url": "https://api.github.com/repos/catppuccin-rfc/polybar/deployments",
"created_at": "2022-10-30T07:24:37Z",
"updated_at": "2022-10-30T07:24:37Z",
"pushed_at": "2024-09-17T21:44:57Z",
"updated_at": "2024-09-19T21:08:02Z",
"pushed_at": "2024-09-19T21:11:14Z",
"git_url": "git://github.com/catppuccin-rfc/polybar.git",
"ssh_url": "[email protected]:catppuccin-rfc/polybar.git",
"clone_url": "https://github.com/catppuccin-rfc/polybar.git",
"svn_url": "https://github.com/catppuccin-rfc/polybar",
"homepage": null,
"size": 21,
"size": 22,
"stargazers_count": 0,
"watchers_count": 0,
"language": null,
Expand All @@ -209,7 +201,7 @@
"mirror_url": null,
"archived": false,
"disabled": false,
"open_issues_count": 2,
"open_issues_count": 4,
"license": {
"key": "mit",
"name": "MIT License",
Expand All @@ -220,12 +212,10 @@
"allow_forking": true,
"is_template": false,
"web_commit_signoff_required": false,
"topics": [

],
"topics": [],
"visibility": "public",
"forks": 0,
"open_issues": 2,
"open_issues": 4,
"watchers": 0,
"default_branch": "main",
"allow_squash_merge": true,
Expand Down Expand Up @@ -332,14 +322,14 @@
"releases_url": "https://api.github.com/repos/catppuccin-rfc/polybar/releases{/id}",
"deployments_url": "https://api.github.com/repos/catppuccin-rfc/polybar/deployments",
"created_at": "2022-10-30T07:24:37Z",
"updated_at": "2022-10-30T07:24:37Z",
"pushed_at": "2024-09-17T21:44:57Z",
"updated_at": "2024-09-19T21:08:02Z",
"pushed_at": "2024-09-19T21:11:14Z",
"git_url": "git://github.com/catppuccin-rfc/polybar.git",
"ssh_url": "[email protected]:catppuccin-rfc/polybar.git",
"clone_url": "https://github.com/catppuccin-rfc/polybar.git",
"svn_url": "https://github.com/catppuccin-rfc/polybar",
"homepage": null,
"size": 21,
"size": 22,
"stargazers_count": 0,
"watchers_count": 0,
"language": null,
Expand All @@ -353,7 +343,7 @@
"mirror_url": null,
"archived": false,
"disabled": false,
"open_issues_count": 2,
"open_issues_count": 4,
"license": {
"key": "mit",
"name": "MIT License",
Expand All @@ -364,12 +354,10 @@
"allow_forking": true,
"is_template": false,
"web_commit_signoff_required": false,
"topics": [

],
"topics": [],
"visibility": "public",
"forks": 0,
"open_issues": 2,
"open_issues": 4,
"watchers": 0,
"default_branch": "main",
"allow_squash_merge": true,
Expand Down Expand Up @@ -482,14 +470,14 @@
"releases_url": "https://api.github.com/repos/catppuccin-rfc/polybar/releases{/id}",
"deployments_url": "https://api.github.com/repos/catppuccin-rfc/polybar/deployments",
"created_at": "2022-10-30T07:24:37Z",
"updated_at": "2022-10-30T07:24:37Z",
"pushed_at": "2024-09-17T21:44:57Z",
"updated_at": "2024-09-19T21:08:02Z",
"pushed_at": "2024-09-19T21:11:14Z",
"git_url": "git://github.com/catppuccin-rfc/polybar.git",
"ssh_url": "[email protected]:catppuccin-rfc/polybar.git",
"clone_url": "https://github.com/catppuccin-rfc/polybar.git",
"svn_url": "https://github.com/catppuccin-rfc/polybar",
"homepage": null,
"size": 21,
"size": 22,
"stargazers_count": 0,
"watchers_count": 0,
"language": null,
Expand All @@ -503,7 +491,7 @@
"mirror_url": null,
"archived": false,
"disabled": false,
"open_issues_count": 2,
"open_issues_count": 4,
"license": {
"key": "mit",
"name": "MIT License",
Expand All @@ -514,17 +502,13 @@
"allow_forking": true,
"is_template": false,
"web_commit_signoff_required": false,
"topics": [

],
"topics": [],
"visibility": "public",
"forks": 0,
"open_issues": 2,
"open_issues": 4,
"watchers": 0,
"default_branch": "main",
"custom_properties": {

}
"custom_properties": {}
},
"organization": {
"login": "catppuccin-rfc",
Expand Down
540 changes: 0 additions & 540 deletions fixtures/pull_request_synchronize.json

This file was deleted.

9 changes: 8 additions & 1 deletion justfile
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,11 @@ repository_rename current_repo new_repo:
#
# Transfer an existing repository to a new owner
repository_transfer current_owner_plus_repo new_owner:
gh api repos/{{current_owner_plus_repo}}/transfer -f new_owner={{new_owner}}
gh api repos/{{current_owner_plus_repo}}/transfer -f new_owner={{new_owner}}

# Create a pull request, close and reopen it in catppuccin-rfc/polybar
pull_request:
#!/usr/bin/env bash
PR_URL=$(gh pr create --base main --head sgoudham-patch-1 --title "rockdove-{{datetime_utc("%Y%m%d_%H%M%S")}}" --body "rockdove" --repo catppuccin-rfc/polybar)
gh pr close "$PR_URL"
gh pr reopen "$PR_URL"
Loading

0 comments on commit 25c2784

Please sign in to comment.