GitHub-tietovarastojen standardisoinnin automatisointi
Vilpponen, Veikko (2023)
Vilpponen, Veikko
2023
All rights reserved. This publication is copyrighted. You may download, display and print it for Your own personal use. Commercial use is prohibited.
Julkaisun pysyvä osoite on
https://urn.fi/URN:NBN:fi:amk-2023112030120
https://urn.fi/URN:NBN:fi:amk-2023112030120
Tiivistelmä
Tässä opinnäytetyössä oli tavoitteena toteuttaa automatisointityökalun ensim mäinen versio toimeksiantajalle. Työkalun tulisi helpottaa GitHub-tietovarasto jen kehityshaarojen ja näiden suojaussääntöjen tarkistamista ja päivittämistä.
Mikäli automaattinen päivittäminen ei ole mahdollista, työkalun tulisi tarjota
linkki, josta käyttäjä voi tehdä korjaukset itse.
Toimeksiantajana toimi mikkeliläinen ohjelmistokehitys yritys Metatavu Oy.
Metatavulta löytyi tarvetta työkalulle, joka helpottaisi GitHub-tietovarastojen
tarkistamista ja päivittämistä standardien mukaisiksi. Tämän tulisi automati saation avulla vähentää GitHub-tietovarastojen ylläpitoon vaadittua työtä.
Sovelluksen kehittämisessä hyödynnettiin GraphQL-kyselykieltä GitHub-raja pinnan kutsumiseen. Sovellus itsessään luotiin Kotlin-ohjelmointikielellä ja
Gradle-automaatiotyökalua hyödyntämällä. Sovelluksen kehittämisessä hyö dynnettiin myös Apollo GraphQl Kotlinia, joka helpottaa GraphQL-kyselyiden
ja mutaatioiden hyödyntämistä Kotlin-projekteissa.
Työssä käydään läpi kehitettävän työkalun projektirakenne, tärkeimmät osat ja
toiminnot. Työkalun toimintoihin kuuluu, kuinka työkalu tarkistaa ja tarvittaessa
päivittää GitHub-tietovaraston kehityshaarat ja näiden suojaussäännöt. Lo puksi käydään läpi esimerkkitapaus, jossa työkalua käytettiin julkisen tietova raston tarkastamiseen ja päivittämiseen. Tämä kuvaa, kuinka sovellusta tes tattiin ja toiminnallisuus todennettiin.
Tämän työn tuottama työkalu on ensimmäinen versio. Tämän vuoksi jatkoke hitysmahdollisuuksia on runsaasti. Näihin kuuluu mahdollisia kehityksiä mu kautettuihin suojaussääntöihin työkalun sisällä, parannuksia valtuuksien käsit telyyn ja mahdollisuus luoda uusia tietovarastoja työkalun sisällä. Lisäksi toi minnallisuutta voidaan automatisoida enemmän hyödyntämällä eri rajapintoja.
Työn lopputuloksena on työkalu, joka vastaa toimeksiantoa. Se suorittaa suu rimman osan vaatimuksista automaatiota hyödyntämällä. Osat, joita ei voitu
automatisoida tai joiden automatisointi on tämän työn ulkopuolella, ohjataan
tekemään käsin linkin avulla. In this thesis, the objective was to implement the initial version of an automa tion tool for the thesis commissioner. The tool should facilitate the verification
and updating of GitHub branches and protection rules. If automatic updates
are not possible, the tool should provide a link for users to make the neces sary corrections themselves.
The thesis commissioner for this project was Metatavu Oy, a software devel opment company based in Mikkeli. The commissioner had a need for a tool
that would simplify the verification and updating of GitHub repository stand ards. This should be achieved through automation to reduce the maintenance
effort required for data sources.
The development of the application utilized the GraphQL query language to
call the GitHub API. The application itself was created using the Kotlin pro gramming language and Gradle automation tool. The development also made
use of Apollo GraphQL Kotlin, which makes the use of GraphQL queries and
mutations easier in Kotlin projects.
The thesis covered the project structure and key components of the tool. It
also introduced the functions of the tool, including how it checked and updated
GitHub repository branches and their protection rules when necessary. Finally,
an example case was presented in which the tool was used to inspect and up date a public repository, demonstrating how the application was tested and its
functionality verified.
The tool produced in this thesis was the first version. As a result, there are
plenty of opportunities for further development. These may include possible
enhancements to customized branch protection rules within the tool, improve ments in authorization handling, the ability to create new repositories within
the tool and further automation utilizing different APIs.
The result of this work was a tool that met the requirements, performing most
of the tasks with automation. Parts that could not be automated or that were
beyond the scope of this work were directed to be performed manually
through a provided link.
Mikäli automaattinen päivittäminen ei ole mahdollista, työkalun tulisi tarjota
linkki, josta käyttäjä voi tehdä korjaukset itse.
Toimeksiantajana toimi mikkeliläinen ohjelmistokehitys yritys Metatavu Oy.
Metatavulta löytyi tarvetta työkalulle, joka helpottaisi GitHub-tietovarastojen
tarkistamista ja päivittämistä standardien mukaisiksi. Tämän tulisi automati saation avulla vähentää GitHub-tietovarastojen ylläpitoon vaadittua työtä.
Sovelluksen kehittämisessä hyödynnettiin GraphQL-kyselykieltä GitHub-raja pinnan kutsumiseen. Sovellus itsessään luotiin Kotlin-ohjelmointikielellä ja
Gradle-automaatiotyökalua hyödyntämällä. Sovelluksen kehittämisessä hyö dynnettiin myös Apollo GraphQl Kotlinia, joka helpottaa GraphQL-kyselyiden
ja mutaatioiden hyödyntämistä Kotlin-projekteissa.
Työssä käydään läpi kehitettävän työkalun projektirakenne, tärkeimmät osat ja
toiminnot. Työkalun toimintoihin kuuluu, kuinka työkalu tarkistaa ja tarvittaessa
päivittää GitHub-tietovaraston kehityshaarat ja näiden suojaussäännöt. Lo puksi käydään läpi esimerkkitapaus, jossa työkalua käytettiin julkisen tietova raston tarkastamiseen ja päivittämiseen. Tämä kuvaa, kuinka sovellusta tes tattiin ja toiminnallisuus todennettiin.
Tämän työn tuottama työkalu on ensimmäinen versio. Tämän vuoksi jatkoke hitysmahdollisuuksia on runsaasti. Näihin kuuluu mahdollisia kehityksiä mu kautettuihin suojaussääntöihin työkalun sisällä, parannuksia valtuuksien käsit telyyn ja mahdollisuus luoda uusia tietovarastoja työkalun sisällä. Lisäksi toi minnallisuutta voidaan automatisoida enemmän hyödyntämällä eri rajapintoja.
Työn lopputuloksena on työkalu, joka vastaa toimeksiantoa. Se suorittaa suu rimman osan vaatimuksista automaatiota hyödyntämällä. Osat, joita ei voitu
automatisoida tai joiden automatisointi on tämän työn ulkopuolella, ohjataan
tekemään käsin linkin avulla.
and updating of GitHub branches and protection rules. If automatic updates
are not possible, the tool should provide a link for users to make the neces sary corrections themselves.
The thesis commissioner for this project was Metatavu Oy, a software devel opment company based in Mikkeli. The commissioner had a need for a tool
that would simplify the verification and updating of GitHub repository stand ards. This should be achieved through automation to reduce the maintenance
effort required for data sources.
The development of the application utilized the GraphQL query language to
call the GitHub API. The application itself was created using the Kotlin pro gramming language and Gradle automation tool. The development also made
use of Apollo GraphQL Kotlin, which makes the use of GraphQL queries and
mutations easier in Kotlin projects.
The thesis covered the project structure and key components of the tool. It
also introduced the functions of the tool, including how it checked and updated
GitHub repository branches and their protection rules when necessary. Finally,
an example case was presented in which the tool was used to inspect and up date a public repository, demonstrating how the application was tested and its
functionality verified.
The tool produced in this thesis was the first version. As a result, there are
plenty of opportunities for further development. These may include possible
enhancements to customized branch protection rules within the tool, improve ments in authorization handling, the ability to create new repositories within
the tool and further automation utilizing different APIs.
The result of this work was a tool that met the requirements, performing most
of the tasks with automation. Parts that could not be automated or that were
beyond the scope of this work were directed to be performed manually
through a provided link.