Skip to content

Manage repository access for GitHub Apps using GitHub Actions and issue templates

License

Notifications You must be signed in to change notification settings

ActionsDesk/actions-app-repository-management

Repository files navigation

GitHub App Repository Management

This repository is a template for Services customers to setup an automation for onboarding GitHub app repos into installed GitHub apps with the selected option for repository selection.

DISCLAIMER: Since this is considered a template to be used with customers, opening the issues here will not grant any access in the GitHub organization

Available GitHub Applications

This list is autogenerated using the script from app-list-generator

ID Name Description Owner Permissions
test-app test-app This is a description for the test we are performing hubber - contents (write)
- metadata (read)
- environments (write)
- administration (write)
- organization_packages (write)

Instructions

You can request that a repository is added to, or removed from, one of the approved GitHub Applications by raising an issue in this repository. There are issue templates that you must use to get the action completed and you should ensure that you adhere to the following suggestions:

  • Do not change the title of the issue.
    • Any changes to the title will mean the issue is closed without any further action.
  • The issue content should be valid yaml.
    • If the content does not parse correctly then the ticket will be close without any further action.
  • You may supply multiple repositories and GitHub Application names.
    • Valid repositories will be added to all valid GitHub Application names.
  • Once an issue has been opened it will be processed based on the initial data entered.
    • Do not try to change the issue after raised as it will not be actioned.
    • Once complete the issue will be locked and closed.
    • Any comments added to an issue will be ignored.

How to use this repository

  • Clone this repository and change the documentation to fit the customer needs
  • Change the content of the file githubapps.json to contain the GitHub apps that you want to manage
  • Edit the templates in ISSUE_TEMPLATE to fit the policies required
  • Add the secret PAT to the GitHub actions secret with org:admin scope
  • Test that the workflows are workign as expected

This repository requires PAT machine account authentication since the repository addition/deletion from the GitHub apps is not allowed with GitHub Apps scopes.

Single Repository To GitHub Application example content

Repository Name: 
- group-repositoryname

GitHub Application: 
- github-app-name

Multiple Repository To Multiple GitHub Applications example content

Repository Name: 
- group-repositoryone
- group-repositorytwo
- newgroup-repositorytwo

GitHub Application: 
- github-app-name
- github-app-name-two

Test the app

The app contains tests that can be run with the following commands under actions/app-management:

npm install
npm run test

About

Manage repository access for GitHub Apps using GitHub Actions and issue templates

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks