From a9bede36e1d0521504ffd4f39377ad0d4719a17d Mon Sep 17 00:00:00 2001 From: Daniel Clayton Date: Fri, 21 Jan 2022 12:03:53 -0700 Subject: [PATCH] docs(plugins): add GH OAuth to github-actions docs In order for GitHub Actions plugin to work, the GitHub OAuth application must be created at the organization level. Updated docs to assist others that may run into any issues related to this. Signed-off-by: Daniel Clayton --- .changeset/swift-tomatoes-jog.md | 5 +++++ CONTRIBUTING.md | 2 +- plugins/github-actions/README.md | 4 +++- 3 files changed, 9 insertions(+), 2 deletions(-) create mode 100644 .changeset/swift-tomatoes-jog.md diff --git a/.changeset/swift-tomatoes-jog.md b/.changeset/swift-tomatoes-jog.md new file mode 100644 index 0000000000..044bf5ef98 --- /dev/null +++ b/.changeset/swift-tomatoes-jog.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-github-actions': patch +--- + +Update GitHub OAuth documentation to include it must be created as a GitHub Organization OAuth application. diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 31f912f43e..f054de05ce 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -78,7 +78,7 @@ If you're contributing to the backend or CLI tooling, be mindful of cross-platfo Also be sure to skim through our [ADRs](docs/architecture-decisions) to see if they cover what you're working on. In particular [ADR006: Avoid React.FC and React.SFC](docs/architecture-decisions/adr006-avoid-react-fc.md) is one to look out for. -If there are any updates in `markdown` file please make sure to run `yarn run lint:docs`. Though it is checked on `lint-staged`. It is required to install [vale](https://docs.errata.ai/vale/install) separately and make sure it is accessed by global command. +If there are any updates in `markdown` file please make sure to run `yarn run lint:docs`. Though it is checked on `lint-staged`. It is required to install [vale](https://docs.errata.ai/vale/install) `1.4.0` separately and make sure it is accessed by global command. ## Developer Certificate of Origin diff --git a/plugins/github-actions/README.md b/plugins/github-actions/README.md index 082267d424..c55bb260a8 100644 --- a/plugins/github-actions/README.md +++ b/plugins/github-actions/README.md @@ -11,7 +11,7 @@ TBD ### Generic Requirements 1. Provide OAuth credentials: - 1. [Create an OAuth App](https://developer.github.com/apps/building-oauth-apps/creating-an-oauth-app/) with the callback URL set to `http://localhost:7007/api/auth/github`. + 1. [Create an OAuth App](https://developer.github.com/apps/building-oauth-apps/creating-an-oauth-app/) in the GitHub organization with the callback URL set to `http://localhost:7007/api/auth/github`. 2. Take the Client ID and Client Secret from the newly created app's settings page and put them into `AUTH_GITHUB_CLIENT_ID` and `AUTH_GITHUB_CLIENT_SECRET` environment variables. 2. Annotate your component with a correct GitHub Actions repository and owner: @@ -75,3 +75,5 @@ const serviceEntityPage = ( ## Limitations - There is a limit of 100 apps for one OAuth client/token pair +- The OAuth application must be at the GitHub organization level in order to display the workflows. If you do + not see any workflows, confirm the OAuth application was created in the organization and not a specific user account.