Skip to content

Commit

Permalink
Merge pull request #92 from philip-gai/develop
Browse files Browse the repository at this point in the history
Merge Develop
  • Loading branch information
philip-gai authored Sep 17, 2021
2 parents 4752591 + 13cb51f commit 4e49cec
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 8 deletions.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Azure DevOps ChatOps - GitHub Action
# https://github.com/marketplace/actions/azure-devops-chatops

name: "Azure DevOps ChatOps"

on:
Expand All @@ -14,8 +17,8 @@ jobs:
- name: Azure DevOps ChatOps
uses: philip-gai/github-ado-chatops@v1.0.0 # Check marketplace for the latest version
with:
ado_org: philip-gai
ado_project: github-ado-chatops
ado_repo: github-ado-chatops
ado_pat: ${{ secrets.ADO_PAT }}
ado_org: philip-gai # replace
ado_project: github-ado-chatops # replace
ado_repo: github-ado-chatops # replace
ado_pat: ${{ secrets.ADO_PAT }} # make sure this matches the name of the secret you made
github_token: ${{ secrets.GITHUB_TOKEN }}
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Integrate GitHub with Azure DevOps via ChatOps! 🚀

| Command | Aliases | Description | Options | Context |
| ------------- | ------------- | ------------- | ------------- | ------------- |
| `/cb-ado` | `/create-branch-ado` | Creates a branch in Azure DevOps using information from the issue.<br/>Default: `feature/{issueNumber}-{issueName}-{issueTitle}`. | <ul><li>`-username`: The username to use in your branch name.<br/>Default: GitHub username</li><li>`-branch`: The branch to branch from.<br/>Default: The default branch set in ADO</li><li>`-type`: The type of branch to make (aka the first part of the branch name path).<br/>Valid values are 'bug'/'bugs', 'feature'/'features', 'release'/'releases' or 'user'/'users'.<br/>Default: `feature`</li><li>`-name`: The branch name if you want to override any auto naming conventions.</li></ul> | Issues |
| `/cb-ado` | `/create-branch-ado` | Creates a branch in Azure DevOps using information from the issue.<br/>Default: `feature/{issueNumber}-{issueName}-{issueTitle}`. | <ul><li>`-username`: The username to use in your branch name.<br/>Default: GitHub username</li><li>`-branch`: The branch to branch from.<br/>Default: The default branch set in ADO</li><li>`-type`: The type of branch to make (aka the first part of the branch name path).<br/>Valid values are user, users, bug, bugs, feature, features, release or releases.<br/>Default: `feature`</li><li>`-name`: The branch name if you want to override any auto naming conventions.</li></ul> | Issues |

## Getting Started

Expand All @@ -21,14 +21,16 @@ Integrate GitHub with Azure DevOps via ChatOps! 🚀
1. Create a personal access token (PAT) for your ADO repository ([Use personal access tokens](https://docs.microsoft.com/en-us/azure/devops/organizations/accounts/use-personal-access-tokens-to-authenticate?toc=%2Fazure%2Fdevops%2Forganizations%2Ftoc.json&bc=%2Fazure%2Fdevops%2Forganizations%2Fbreadcrumb%2Ftoc.json&view=azure-devops&tabs=preview-page))
1. Scopes: Custom Defined - Code (Read & Write)
2. Create an encrypted secret named `ADO_PAT` in your GitHub repository with the ADO PAT token value ([Creating encrypted secrets for a repository](https://docs.github.com/en/actions/reference/encrypted-secrets#creating-encrypted-secrets-for-a-repository)).
3. Create a workflow file in your GitHub repo with the path `.github/workflows/github-ado-chatops.yml` [by following this example](.github/workflows/github-ado-chatops.yml), updating the input parameters with your relevant ADO repo information.
3. Create a workflow file in your GitHub repo with the path `.github/workflows/ado-chatops.yml` [by following this example](.github/workflows/ado-chatops.yml), updating the input parameters with your relevant ADO repo information.
4. You can now use ADO ChatOps in your GitHub repo! 🎉🎉🎉
5. Test it out! On any Issue, try the `/cb-ado` command and enjoy 😍

#### Inputs
#### Configuration

You can view the inputs defined in [action.yml](action.yml)

Add these to your workflow file under the `with` section.

### Debugging

1. Set a secret in your repo named `ACTIONS_STEP_DEBUG` to `true` to get debug logging ([Reference](https://docs.github.com/en/actions/monitoring-and-troubleshooting-workflows/enabling-debug-logging))
Expand Down
2 changes: 1 addition & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ inputs:
description: "The branch from which to branch from by default. This defaults to the main branch set in ADO"
required: false
default_target_branch_type:
description: "The default branch type to use when none is specified"
description: "The default branch type to use when none is specified. Valid values are user, users, bug, bugs, feature, features, release or releases. Default is feature"
required: true
default: 'feature'
runs:
Expand Down

0 comments on commit 4e49cec

Please sign in to comment.