-
Notifications
You must be signed in to change notification settings - Fork 0
Feature/initial functionality #1
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
Open
sbglasius
wants to merge
4
commits into
main
Choose a base branch
from
feature/initial-functionality
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,33 @@ | ||
| version: 2 | ||
| updates: | ||
| # Gradle dependencies and wrapper | ||
| - package-ecosystem: "gradle" | ||
| directory: "/" | ||
| schedule: | ||
| interval: "weekly" | ||
| day: "monday" | ||
| labels: | ||
| - "deps" | ||
| open-pull-requests-limit: 10 | ||
| groups: | ||
| gradle-dependencies: | ||
| patterns: | ||
| - "*" | ||
| exclude-patterns: | ||
| - "gradle" | ||
| ignore: | ||
| - dependency-name: "gradle" | ||
| versions: [ ">= 9" ] | ||
|
|
||
| # GitHub Actions | ||
| - package-ecosystem: "github-actions" | ||
| directory: "/" | ||
| schedule: | ||
| interval: "weekly" | ||
| day: "monday" | ||
| labels: | ||
| - "deps" | ||
| groups: | ||
| github-actions: | ||
| patterns: | ||
| - "*" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| # See https://docs.github.com/en/code-security/supply-chain-security/understanding-your-software-supply-chain/exploring-the-dependencies-of-a-repository#changing-the-used-by-package | ||
| # This file associates this repository with packages published to external registries (Maven Central) | ||
| # so that GitHub can display the correct "Used by" package on the repository page. | ||
| # The Package URL (purl) format is defined at https://github.com/package-url/purl-spec | ||
|
|
||
| version: 1 | ||
| references: | ||
| - purl: pkg:maven/io.github.gpc/grails-plugin-template |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,134 @@ | ||
| name-template: $RESOLVED_VERSION | ||
| tag-template: v$RESOLVED_VERSION | ||
| pull-request: | ||
| title-templates: | ||
| fix: '🐛 $TITLE (#$NUMBER)' | ||
| feat: '🚀 $TITLE (#$NUMBER)' | ||
| default: '$TITLE (#$NUMBER)' | ||
| autolabeler: | ||
| - label: 'bug' | ||
| branch: | ||
| - '/fix\/.+/' | ||
| title: | ||
| - '/fix/i' | ||
| - label: 'improvement' | ||
| branch: | ||
| - '/improv\/.+/' | ||
| title: | ||
| - '/improv/i' | ||
| - label: 'feature' | ||
| branch: | ||
| - '/feature\/.+/' | ||
| title: | ||
| - '/feat/i' | ||
| - label: 'documentation' | ||
| branch: | ||
| - '/docs\/.+/' | ||
| title: | ||
| - '/docs/i' | ||
| - label: 'maintenance' | ||
| branch: | ||
| - '/(chore|refactor|style|test|ci|perf|build)\/.+/' | ||
| title: | ||
| - '/(chore|refactor|style|test|ci|perf|build)/i' | ||
| - label: 'chore' | ||
| branch: | ||
| - '/chore\/.+/' | ||
| title: | ||
| - '/chore/i' | ||
| - label: 'refactor' | ||
| branch: | ||
| - '/refactor\/.+/' | ||
| title: | ||
| - '/refactor/i' | ||
| - label: 'style' | ||
| branch: | ||
| - '/style\/.+/' | ||
| title: | ||
| - '/style/i' | ||
| - label: 'test' | ||
| branch: | ||
| - '/test\/.+/' | ||
| title: | ||
| - '/test/i' | ||
| - label: 'ci' | ||
| branch: | ||
| - '/ci\/.+/' | ||
| title: | ||
| - '/ci/i' | ||
| - label: 'perf' | ||
| branch: | ||
| - '/perf\/.+/' | ||
| title: | ||
| - '/perf/i' | ||
| - label: 'build' | ||
| branch: | ||
| - '/build\/.+/' | ||
| title: | ||
| - '/build/i' | ||
| - label: 'deps' | ||
| branch: | ||
| - '/deps\/.+/' | ||
| title: | ||
| - '/deps/i' | ||
| - label: 'revert' | ||
| branch: | ||
| - '/revert\/.+/' | ||
| title: | ||
| - '/revert/i' | ||
| categories: | ||
| - title: '🚀 Features' | ||
| labels: | ||
| - 'feature' | ||
| - "type: enhancement" | ||
| - "type: new feature" | ||
| - "type: major" | ||
| - "type: minor" | ||
| - title: '💡 Improvements' | ||
| labels: | ||
| - 'improvement' | ||
| - "type: improvement" | ||
|
|
||
| - title: '🐛 Bug Fixes' | ||
| labels: | ||
| - 'fix' | ||
| - 'bug' | ||
| - "type: bug" | ||
| - title: '📚 Documentation' | ||
| labels: | ||
|
|
||
| - 'docs' | ||
| - title: '🔧 Maintenance' | ||
| labels: | ||
| - 'maintenance' | ||
| - 'chore' | ||
| - 'refactor' | ||
| - 'style' | ||
| - 'test' | ||
| - 'ci' | ||
| - 'perf' | ||
| - 'build' | ||
| - "type: ci" | ||
| - "type: build" | ||
| - title: '⏪ Reverts' | ||
| labels: | ||
| - 'revert' | ||
| change-template: '- $TITLE @$AUTHOR (#$NUMBER)' | ||
| version-resolver: | ||
| major: | ||
| labels: | ||
| - 'type: major' | ||
| minor: | ||
| labels: | ||
| - 'type: minor' | ||
| patch: | ||
| labels: | ||
| - 'type: patch' | ||
| default: patch | ||
| template: | | ||
| ## What's Changed | ||
|
|
||
| $CHANGES | ||
|
|
||
| ## Contributors | ||
|
|
||
| $CONTRIBUTORS | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,71 @@ | ||
| { | ||
| "$schema": "https://docs.renovatebot.com/renovate-schema.json", | ||
| "extends": [ | ||
| "config:recommended", | ||
| ":semanticCommitTypeAll(deps)", | ||
| "group:allNonMajor" | ||
| ], | ||
| "labels": [ | ||
| "deps" | ||
| ], | ||
| "schedule": [ | ||
| "before 6am on monday" | ||
| ], | ||
| "gradle": { | ||
| "enabled": true, | ||
| "fileMatch": [ | ||
| "(^|/)build\\.gradle$", | ||
| "(^|/)settings\\.gradle$", | ||
| "(^|/)gradle\\.properties$", | ||
| "build-logic/src/main/groovy/.*\\.gradle$" | ||
| ] | ||
| }, | ||
| "gradle-wrapper": { | ||
| "enabled": true | ||
| }, | ||
| "github-actions": { | ||
| "enabled": true | ||
| }, | ||
| "packageRules": [ | ||
| { | ||
| "description": "Group all Grails dependencies together", | ||
| "matchPackagePatterns": [ | ||
| "^org\\.apache\\.grails" | ||
| ], | ||
| "groupName": "grails" | ||
| }, | ||
| { | ||
| "description": "Group all Spring Boot dependencies together", | ||
| "matchPackagePatterns": [ | ||
| "^org\\.springframework\\.boot" | ||
| ], | ||
| "groupName": "spring-boot" | ||
| }, | ||
| { | ||
| "description": "Group all GitHub Actions updates together", | ||
| "matchManagers": [ | ||
| "github-actions" | ||
| ], | ||
| "groupName": "github-actions" | ||
| }, | ||
| { | ||
| "description": "Group all Spock/testing dependencies together", | ||
| "matchPackagePatterns": [ | ||
| "^org\\.spockframework" | ||
| ], | ||
| "groupName": "spock" | ||
| }, | ||
| { | ||
| "description": "Automerge minor and patch updates for dev dependencies", | ||
| "matchUpdateTypes": [ | ||
| "minor", | ||
| "patch" | ||
| ], | ||
| "matchPackagePatterns": [ | ||
| "^com\\.adarshr:gradle-test-logger-plugin" | ||
| ], | ||
| "automerge": true | ||
| } | ||
| ], | ||
| "ignoreDeps": [] | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,73 @@ | ||
| #!/usr/bin/env groovy | ||
| @Grab('org.apache.groovy:groovy-yaml') | ||
| import groovy.json.JsonOutput | ||
| import groovy.json.JsonSlurper | ||
| import groovy.yaml.YamlBuilder | ||
| import groovy.yaml.YamlSlurper | ||
|
|
||
| def token = System.getenv('GITHUB_TOKEN') | ||
| def repo = System.getenv('GITHUB_REPOSITORY') | ||
|
|
||
| if (!token) { | ||
| println "GITHUB_TOKEN not set — skipping contributor update" | ||
| System.exit(0) | ||
| } | ||
|
|
||
| def requestProps = [ | ||
| Authorization : "token ${token}", | ||
| 'User-Agent' : 'update-contributors-action', | ||
| Accept : 'application/vnd.github+json', | ||
| ] | ||
|
|
||
| // 1. Fetch all contributors via REST (sorted by contributions desc, bots excluded) | ||
| def contributors = [] | ||
| def page = 1 | ||
| while (true) { | ||
| def url = "https://api.github.com/repos/${repo}/contributors?per_page=100&page=${page}" | ||
| def batch = new JsonSlurper().parseText(url.toURL().getText(requestProperties: requestProps)) as List | ||
| if (!batch) break | ||
| contributors.addAll(batch) | ||
| page++ | ||
| } | ||
|
|
||
| def humans = contributors.findAll { it.type != 'Bot' } | ||
| if (!humans) { | ||
| println "No human contributors found — skipping update" | ||
| System.exit(0) | ||
| } | ||
|
|
||
| def nodeIds = humans*.node_id | ||
| def loginByNode = humans.collectEntries { [it.node_id, it.login] } | ||
|
|
||
| // 2. Fetch display names via GraphQL | ||
| def gqlQuery = 'query($ids:[ID!]!){nodes(ids:$ids){...on User{id name login}}}' | ||
| def gqlBody = JsonOutput.toJson([query: gqlQuery, variables: [ids: nodeIds]]) | ||
|
|
||
| def conn = 'https://api.github.com/graphql'.toURL().openConnection() as HttpURLConnection | ||
| conn.doOutput = true | ||
| conn.requestMethod = 'POST' | ||
| conn.setRequestProperty('Authorization', "token ${token}") | ||
| conn.setRequestProperty('Content-Type', 'application/json') | ||
| conn.setRequestProperty('User-Agent', 'update-contributors-action') | ||
| conn.outputStream.withWriter { it << gqlBody } | ||
|
|
||
| def gqlNodes = new JsonSlurper().parseText(conn.inputStream.text).data.nodes | ||
| def nameByNode = gqlNodes.findAll().collectEntries { [(it.id): (it.name ?: it.login)] } as Map<String, String> | ||
|
sbglasius marked this conversation as resolved.
|
||
|
|
||
| // 3. Build ordered map: login → display name (preserving contribution order) | ||
| def ordered = humans.collectEntries { c -> | ||
| def login = loginByNode[c.node_id] | ||
| [login, nameByNode[c.node_id] ?: login] | ||
| } as LinkedHashMap<String, String> | ||
|
|
||
| // 4. Update the contributors section in project.yml | ||
| def projectYmlFile = new File('project.yml') | ||
| def projectYml = new YamlSlurper().parse(projectYmlFile) as Map | ||
|
|
||
| projectYml.contributors = ordered | ||
|
|
||
| def yaml = new YamlBuilder() | ||
| yaml(projectYml) | ||
| projectYmlFile.text = yaml.toString() | ||
|
|
||
| println "Updated ${ordered.size()} contributors in project.yml" | ||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.