Skip to content

Commit

Permalink
Fixing path and updating readme (#22)
Browse files Browse the repository at this point in the history
* making path more dynamic

* removing cd

* added back echo

* adding debug message

* adding jq pre-req

* incrementing version
  • Loading branch information
joshjohanning authored Aug 19, 2022
1 parent bc0c6a8 commit af6f7fd
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 5 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ jobs:
1. Create a repository secret titled `AZURE_DEVOPS_PAT` - it needs to be a full PAT
2. Pass the Azure DevOps organization to the `azure-devops-organization` input parameter

Note: `jq` needs to be [installed](https://stedolan.github.io/jq/download/) on the runner running this action

## How this works

The action loops through each commit and:
Expand Down
4 changes: 2 additions & 2 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ runs:
# run azdo_commit_message_validator
# have to do some hocus pocus since this isn't a full javascript action
main=$(find ~/work/_actions/joshjohanning/azdo_commit_message_validator -name "main.js" | grep -v "node_modules")
echo $main
main=$(find ../../_actions/joshjohanning/azdo_commit_message_validator -name "main.js" | grep -v "node_modules")
echo "::debug::main.js script location: $main"
PULL_NUMBER=$(jq --raw-output .pull_request.number "$GITHUB_EVENT_PATH")
COMMITS=$(curl -s -H 'Authorization: Bearer ${{ inputs.github-token }}' -H "Accept: application/vnd.github.v3+json" "${GITHUB_API_URL}/repos/${GITHUB_REPOSITORY}/pulls/${PULL_NUMBER}/commits")
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "azure-devops-work-item-link-enforcer-and-linker",
"version": "1.0.0",
"version": "1.0.1",
"private": true,
"description": "GitHub Action to enforce that each commit in a pull request be linked to an Azure DevOps work item and automatically link the pull request to each work item ",
"main": "dist/index.js",
Expand Down

0 comments on commit af6f7fd

Please sign in to comment.